aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 1a836b7a98..93684e8606 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -450,6 +450,11 @@ static uint8_t *command_line_enter(int firstc, long count, int indent)
ExpandCleanup(&s->xpc);
ccline.xpc = NULL;
+ if (s->gotesc) {
+ // There might be a preview window open for inccommand. Close it.
+ close_preview_windows();
+ }
+
if (s->did_incsearch) {
if (s->gotesc) {
curwin->w_cursor = s->save_cursor;
@@ -1958,8 +1963,10 @@ static int command_line_changed(CommandLineState *s)
update_topline();
redrawcmdline();
+
} else if (State & CMDPREVIEW) {
State = (State & ~CMDPREVIEW);
+ close_preview_windows();
update_screen(SOME_VALID); // Clear 'inccommand' preview.
}