Merge pull request #100 from xiaoqixian/main

fixed a bug in capturing guicursor style using regex
This commit is contained in:
~hedy
2024-12-27 09:05:48 +08:00
committed by GitHub

View File

@@ -255,7 +255,8 @@ function Sidebar:update_cursor_style()
-- Set cursor color to CursorLine in normal mode -- Set cursor color to CursorLine in normal mode
if hide_cursor then 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') vim.opt.guicursor:append('n:' .. cur .. '-Cursorline')
end end
end end