diff options
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c index d28962a30..4fbf94428 100644 --- a/src/window.c +++ b/src/window.c @@ -2268,8 +2268,9 @@ entering_window(win_T *win) stop_insert_mode = FALSE; // 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; } #endif |