summaryrefslogtreecommitdiffstats
path: root/src/autocmd.c
diff options
context:
space:
mode:
authororbital <orbital@holgerines.de>2023-04-02 22:05:13 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-02 22:05:13 +0100
commitcde8de034524d00aba4ff4142e658baff511e12d (patch)
tree3546be90832d785283ee31a4001205b3a0cc892c /src/autocmd.c
parent065088d5549e7711668321cc5a77c9a9b684b142 (diff)
patch 9.0.1439: start Insert mode when accessing a hidden prompt bufferv9.0.1439
Problem: Start Insert mode when accessing a hidden prompt buffer. Solution: Call leaving_window() in aucmd_restbuf(). (Thorben Tröbst, closes #12148, closes #12147)
Diffstat (limited to 'src/autocmd.c')
-rw-r--r--src/autocmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index fe2b6cbb14..e5f512503a 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -1657,7 +1657,10 @@ aucmd_restbuf(
}
}
win_found:
-
+#ifdef FEAT_JOB_CHANNEL
+ // May need to stop Insert mode if we were in a prompt buffer.
+ leaving_window(curwin);
+#endif
// Remove the window and frame from the tree of frames.
(void)winframe_remove(curwin, &dummy, NULL);
win_remove(curwin, NULL);