[vim/vim] GUI: preserve blink cycle on CursorHold (PR #21115)

dezza (Vim Github Repository) <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/[email protected]>
```vim
:set guicursor=a:blinkwait100-blinkon300-blinkoff300
:autocmd CursorHold * echo ''
:set updatetime=1000
```
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 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.

I looked briefly into if there was accidental "workarounds" in other gui's, these are my findings:

GTK4: Issue exists - verified.
Win32: uses native win32 API (SetTimer(), KillTimer()) , most likely unaffected
Motif/X11,Photon/Haiku: seems identical in function. Not verified.

Mailing-list: https://groups.google.com/g/vim_dev/c/lmGzT9gftvs/m/kzeEG77fDgAJ

Leaving so someone else can test potentially X11, Haiku, X11

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21115

-- Commit Summary --

  * GUI: preserve blink cycle on CursorHold

-- File Changes --

    M src/gui.c (14)

-- Patch Links --

https://github.com/vim/vim/pull/21115.patch
https://github.com/vim/vim/pull/21115.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/21115
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/[email protected]>

-- 
-- 
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/vim/vim/pull/21115%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.