From 490874f3da4c39a36438b6cfa6d79e594b82806f Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Mon, 21 Feb 2022 16:19:49 +0000 Subject: [PATCH] vim-patch:8.2.4432: cannot use settabvar() while the cmdline window is open Problem: Cannot use settabvar() while the cmdline window is open. Solution: Only give an error when actually switching tabpage. (closes vim/vim#9813) https://github.com/vim/vim/commit/592f6250017c31c8996325403e511f4502077ba5 --- src/nvim/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvim/window.c b/src/nvim/window.c index 5878a6ba0b..3c34620db4 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4269,7 +4269,9 @@ void goto_tabpage(int n) /// @param trigger_leave_autocmds when true trigger *Leave autocommands. void goto_tabpage_tp(tabpage_T *tp, bool trigger_enter_autocmds, bool trigger_leave_autocmds) { - CHECK_CMDWIN; + if (trigger_enter_autocmds || trigger_leave_autocmds) { + CHECK_CMDWIN; + } // Don't repeat a message in another tab page. set_keep_msg(NULL, 0);