aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index e0ba4b72f3..be963d8374 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2271,8 +2271,10 @@ void entering_window(win_T *const win)
}
// When entering the prompt window restart Insert mode if we were in Insert
- // mode when we left it.
- restart_edit = win->w_buffer->b_prompt_insert;
+ // mode when we left it and not already in Insert mode.
+ if ((State & INSERT) == 0) {
+ restart_edit = win->w_buffer->b_prompt_insert;
+ }
}
/// Closes all windows for buffer `buf`.