From 10baf89712724b4b95f7c641f2012f051737003c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 3 Apr 2023 08:36:14 +0800 Subject: vim-patch:9.0.1439: start Insert mode when accessing a hidden prompt buffer (#22867) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Start Insert mode when accessing a hidden prompt buffer. Solution: Call leaving_window() in aucmd_restbuf(). (Thorben Tröbst, closes vim/vim#12148, closes vim/vim#12147) https://github.com/vim/vim/commit/cde8de034524d00aba4ff4142e658baff511e12d Cherry-pick test_prompt_buffer.vim changes from patch 9.0.0631. Co-authored-by: orbital --- src/nvim/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/window.c') diff --git a/src/nvim/window.c b/src/nvim/window.c index 762ad13ba3..48663c5a20 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2417,7 +2417,7 @@ static void win_equal_rec(win_T *next_curwin, bool current, frame_T *topfr, int } } -static void leaving_window(win_T *const win) +void leaving_window(win_T *const win) FUNC_ATTR_NONNULL_ALL { // Only matters for a prompt window. -- cgit