aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2024-06-04 15:09:12 +0200
committerGitHub <noreply@github.com>2024-06-04 06:09:12 -0700
commitb66106a46c5c6180c7f80852a8c822b400e73100 (patch)
tree3ea46b835fbbd014a719fdab42487385843b5225 /src/nvim/ex_getln.c
parent8cbb1f20e557461c8417583a7f69d53aaaef920b (diff)
downloadrneovim-b66106a46c5c6180c7f80852a8c822b400e73100.tar.gz
rneovim-b66106a46c5c6180c7f80852a8c822b400e73100.tar.bz2
rneovim-b66106a46c5c6180c7f80852a8c822b400e73100.zip
fix(ui): superfluous showmode / excessive grid_cursor_goto #29089
Problem: Unsetting global variables earlier in #28578 to avoid recursiveness, caused superfluous or even unlimited showmode(). Solution: Partly revert #28578 so that the globals are unset at the end of showmode(), and avoid recursiveness for ext UI by adding a recursive function guard to each generated UI call that may call a Lua callback.
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 4323a9d221..cef1868fc8 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3455,11 +3455,9 @@ void cmdline_screen_cleared(void)
/// called by ui_flush, do what redraws necessary to keep cmdline updated.
void cmdline_ui_flush(void)
{
- static bool flushing = false;
- if (!ui_has(kUICmdline) || flushing) {
+ if (!ui_has(kUICmdline)) {
return;
}
- flushing = true;
int level = ccline.level;
CmdlineInfo *line = &ccline;
while (level > 0 && line) {
@@ -3474,7 +3472,6 @@ void cmdline_ui_flush(void)
}
line = line->prev_ccline;
}
- flushing = false;
}
// Put a character on the command line. Shifts the following text to the