aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-11-08 11:22:14 +0100
committerGitHub <noreply@github.com>2024-11-08 11:22:14 +0100
commit8ab1903092f0ab193adf17ee635da838cce01dfa (patch)
tree85e11afe668a2fe1c1b67fa946a5955ff50b7f7a /src/nvim/ex_getln.c
parentf83a31b49d5d976cd39f7faa6356565cb0a4a97a (diff)
parent59e130b6cacd71326ecc99ca180fd574abc8115c (diff)
downloadrneovim-8ab1903092f0ab193adf17ee635da838cce01dfa.tar.gz
rneovim-8ab1903092f0ab193adf17ee635da838cce01dfa.tar.bz2
rneovim-8ab1903092f0ab193adf17ee635da838cce01dfa.zip
Merge pull request #31040 from luukvbaal/cmdpreviewcurs
fix(inccommand): ensure cursor is where it belongs
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c3
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();