mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
fix(inccommand): ensure cursor is where it belongs
Problem: Inccommand preview callback may flush inaccurate cmdline cursor position. Solution: Ensure cursor is where it belongs when doing command preview.
This commit is contained in:
@@ -2550,6 +2550,9 @@ static bool cmdpreview_may_show(CommandLineState *s)
|
||||
goto end;
|
||||
}
|
||||
|
||||
// Cursor may be at the end of the message grid rather than at cmdspos.
|
||||
// Place it there in case preview callback flushes it. #30696
|
||||
cursorcmd();
|
||||
// Flush now: external cmdline may itself wish to update the screen which is
|
||||
// currently disallowed during cmdpreview(no longer needed in case that changes).
|
||||
cmdline_ui_flush();
|
||||
|
Reference in New Issue
Block a user