diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-11-02 06:54:43 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-11-07 13:12:30 +0100 |
commit | 59e130b6cacd71326ecc99ca180fd574abc8115c (patch) | |
tree | f02c39ba1c14ca5d3ce7f80c3deea37c43a05c34 /src | |
parent | 3688a333544251c887d78e6501eec55f0fb685f8 (diff) | |
download | rneovim-59e130b6cacd71326ecc99ca180fd574abc8115c.tar.gz rneovim-59e130b6cacd71326ecc99ca180fd574abc8115c.tar.bz2 rneovim-59e130b6cacd71326ecc99ca180fd574abc8115c.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_getln.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 389e935557..dda1a18fa6 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -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(); |