diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-30 05:25:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 05:25:00 +0800 |
commit | a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc (patch) | |
tree | 92ddfe2ac249914a9e5c7e490b275374ea41c12b /src/nvim/state.c | |
parent | 29aa08a09da088178bccc5ea29ac1c872bc4ab32 (diff) | |
download | rneovim-a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc.tar.gz rneovim-a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc.tar.bz2 rneovim-a9665bb12cd8cbacbc6ef6df66c1989b0c6f9fcc.zip |
fix(event-loop): duplicate display updating logic in vgetorpeek() (#17913)
Diffstat (limited to 'src/nvim/state.c')
-rw-r--r-- | src/nvim/state.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/state.c b/src/nvim/state.c index f9a3aaab7f..3a7636085b 100644 --- a/src/nvim/state.c +++ b/src/nvim/state.c @@ -15,6 +15,7 @@ #include "nvim/option.h" #include "nvim/option_defs.h" #include "nvim/os/input.h" +#include "nvim/screen.h" #include "nvim/state.h" #include "nvim/ui.h" #include "nvim/vim.h" @@ -54,6 +55,12 @@ getkey: // Event was made available after the last multiqueue_process_events call key = K_EVENT; } else { + // Duplicate display updating logic in vgetorpeek() + if (((State & INSERT) != 0 || p_lz) && (State & CMDLINE) == 0 + && must_redraw != 0 && !need_wait_return) { + update_screen(0); + setcursor(); // put cursor back where it belongs + } // Flush screen updates before blocking ui_flush(); // Call `os_inchar` directly to block for events or user input without |