aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/window.c4
1 files changed, 3 insertions, 1 deletions
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);