Re: The cursor blinks again, but I can't tweak it
Christoffer Aasted <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <[email protected]> |
I've not forgotten you Tony and thanks for reporting it, but its not been easy. I'd be grateful if you'd compile and test out this branch https://github.com/dezza/vim/tree/fix-gtk3-cursor-redraw I will not open a PR or draft yet, as this touches core loops in vim and is not something that should be rushed. I need some verification here. The bug actually seems like a much older bug being revealed by the now more accurate (and faster) gtk3 redraw cycle. Reproduction on unpatched upstream Vim is: :set guicursor=a:blinkwait100-blinkon300-blinkoff300 :autocmd CursorHold * echo '' :set updatetime=1000 There is one more step; press any key like "pgup" or "pgdn" after setting you will see the blinking stops, then resumes - right after it resumes the hiccup happens; exactly 1s (updatetime=1000) later. The blink hiccup then occurs roughly once per second, and changing 'updatetime' changes the interval. I avoided your prepend/append just to make debugging here easier. The underlying problem seems that gui.c /^gui_wait_for_chars( stops and restarts blinking whenever the input loop returns, assuming that means actual user input occurred. CursorHold is thus cause of the hiccup as it wakes the input loop. So the existing guards were not proper, the blink timer was still cancelled and restarted even though the user remained idle. Actually in hindsight, the cursor blinking transitions from stop/start/reset cycles have made perf on gtk3 worse in the past - especially during held keys like scrolling. I looked briefly into if there was "workarounds" in other gui's, these are my findings: GTK4: snapshot/hwaccel more likely to hide this symptom. Win32: uses native win32 API (SetTimer(), KillTimer()) , most likely unaffected Motif/X11,Photon/Haiku: seems identical in function. I have a faint memory of also noting the blinking being inconsistent, this could very well be the cause all along. I'll give u credit for being very attentive to the issue, thanks. On Saturday, August 15, 2026 at 10:13:56 PM UTC+2 Tony Mechelynck wrote: > My GTK3 version (and, among others, the version of packages > "gtk3-devel" and "libgtk-3-0") is 3.4.52-2.2 — distributed by openSUSE > Tumbleweed. > > Best regards, > Tony. > > On Sat, Aug 15, 2026 at 11:20 AM Christoffer Aasted > <[email protected]> wrote: > > > > I ask because I can't reproduce the longer on than off. I only notice > the rare hiccups/resets in timing. > > > > On Sat, Aug 15, 2026 at 10.40 Tony Mechelynck <[email protected]> > wrote: > >> > >> On Sat, Aug 15, 2026 at 5:05 AM Christoffer Aasted <[email protected]> > wrote: > >> > > >> > It should default to wayland. The wayland features in `:version` are > really for terminal clipboard like a small event loop for reading clipboard > for terminal. (confusing, I know) > >> > > >> > @Tony if you can provide a video that would be very helpful so we can > discuss it and I can compare. > >> > >> No I can't provide a video; but no matter which 'guicursor' setting I > >> set, the cursor is on longer than off. Even if I do ":set gcr=<Tab>" > >> to replace my blink settings manually with > >> "a:blinkwait100-blinkon100-blinkoff500" which ought to set the cursor > >> shortly on, then off for half a second, it is still on longer than > >> off. > >> > >> Best regards, > >> Tony. > >> > >> -- > >> -- > >> You received this message from the "vim_dev" maillist. > >> Do not top-post! Type your reply below the text you are replying to. > >> For more information, visit http://www.vim.org/maillist.php > >> > >> --- > >> You received this message because you are subscribed to a topic in the > Google Groups "vim_dev" group. > >> To unsubscribe from this topic, visit > https://groups.google.com/d/topic/vim_dev/lmGzT9gftvs/unsubscribe. > >> To unsubscribe from this group and all its topics, send an email to > [email protected]. > >> To view this discussion visit > https://groups.google.com/d/msgid/vim_dev/CAJkCKXtPcMrGbyHMDa5Nqc2-xua8V%3DooEFuj%2BwNGgiRoYUCAJA%40mail.gmail.com > . > > > > -- > > -- > > You received this message from the "vim_dev" maillist. > > Do not top-post! Type your reply below the text you are replying to. > > For more information, visit http://www.vim.org/maillist.php > > > > --- > > You received this message because you are subscribed to the Google > Groups "vim_dev" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > To view this discussion visit > https://groups.google.com/d/msgid/vim_dev/CAM9yT0-h4JiV%3Djd2A73sUDy%3D5b4H9qQT7jR-OvBMgfLxjePLRQ%40mail.gmail.com > . > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/550fe103-e19d-4099-b242-5b6e029c1489n%40googlegroups.com.