fixed a bug in capturing guicursor style using regex

This commit is contained in:
lunar
2024-11-14 19:59:56 +08:00
parent 6c44527837
commit 0196830391

View File

@@ -255,7 +255,8 @@ function Sidebar:update_cursor_style()
-- Set cursor color to CursorLine in normal mode
if hide_cursor then
local cur = vim.o.guicursor:match('n.-:(.-)[-,]')
-- local cur = vim.o.guicursor:match('n.-:(.-)[-,]')
local cur = vim.o.guicursor:match('n.-:([^,]+)')
vim.opt.guicursor:append('n:' .. cur .. '-Cursorline')
end
end