TL;DR some plugins which do some computation + redrawing causing cursor to flicker
I'm using a combination of pretty popular plugins: ALE + CoC which have some autocmds on CursorHold, InsertLeave etc, which process some lsp/linting behind the scenes. They are working fine, but also are a cause of the cursor flickering (starting visible in some big files 1000+ lines) as shown in the screencast above.
This behavior can be replicated with something like this
vim9script def HeavyComputation(_): number var sum = 0 redraw for _ in range(200000) # adjust loop size if flickering still not visible on your machine or you can set it very big to completely hide the cursor for the time of computation sum += 2 endfor return sum enddef augroup HelloOpana autocmd! autocmd CursorHold * timer_start(1, HeavyComputation) autocmd CursorHold * timer_start(20, HeavyComputation) autocmd CursorHold * timer_start(40, HeavyComputation) augroup END defcompile
My assumption this is happening when redraw follows some heavy computation. If we remove redraw from this code then flickering is gone. Is there a reason for such behavior that cursor is hidden until this computation happens? Can it be prevented somehow?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #11918 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()