mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 06:16:08 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user