diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-12-07 21:42:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-07 21:42:44 +0800 |
commit | 4817547ec4630c2af2c94ade07bbf220992ad0d7 (patch) | |
tree | 71c50001a8ffac5a75c0f3206fcae3d969f33aa1 /src | |
parent | 92e61072ac7493d85c15e3403f17619446782b51 (diff) | |
download | rneovim-4817547ec4630c2af2c94ade07bbf220992ad0d7.tar.gz rneovim-4817547ec4630c2af2c94ade07bbf220992ad0d7.tar.bz2 rneovim-4817547ec4630c2af2c94ade07bbf220992ad0d7.zip |
feat(ex_cmds): :sleep! hides the cursor while sleeping (#31493)
Problem: :sleep! not hiding the cursor is an arbitrary difference from
Vim without obvious justification, and Vim's behavior isn't
easily achievable in Nvim.
Solution: Make :sleep! hide the cursor while sleeping.
Ref:
https://github.com/neovim/neovim/commit/6a01b3fcc361960e559db459e1524418bc76dd66
https://github.com/neovim/neovim/commit/b5c0ade43790cf18f6a54858ddad30d8d9667cf9
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index b7c83ea1ac..b32a8b867f 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -6101,7 +6101,9 @@ static void ex_sleep(exarg_T *eap) default: semsg(_(e_invarg2), eap->arg); return; } - do_sleep(len, false); + + // Hide the cursor if invoked with ! + do_sleep(len, eap->forceit); } /// Sleep for "msec" milliseconds, but return early on CTRL-C. |