@@ -6055,7 +6055,7 @@ ex_win_close(
60556055 emsg (_ (e_cannot_close_autocmd_or_popup_window ));
60566056 return ;
60576057 }
6058- if (window_layout_locked ())
6058+ if (window_layout_locked (CMD_close ))
60596059 return ;
60606060
60616061 need_hide = (bufIsChanged (buf ) && buf -> b_nwindows <= 1 );
@@ -6229,7 +6229,7 @@ ex_tabclose(exarg_T *eap)
62296229 cmdwin_result = K_IGNORE ;
62306230 else if (first_tabpage -> tp_next == NULL )
62316231 emsg (_ (e_cannot_close_last_tab_page ));
6232- else if (!window_layout_locked ())
6232+ else if (!window_layout_locked (CMD_tabclose ))
62336233 {
62346234 tab_number = get_tabpage_arg (eap );
62356235 if (eap -> errmsg == NULL )
@@ -6265,7 +6265,7 @@ ex_tabonly(exarg_T *eap)
62656265 cmdwin_result = K_IGNORE ;
62666266 else if (first_tabpage -> tp_next == NULL )
62676267 msg (_ ("Already only one tab page" ));
6268- else if (!window_layout_locked ())
6268+ else if (!window_layout_locked (CMD_tabonly ))
62696269 {
62706270 tab_number = get_tabpage_arg (eap );
62716271 if (eap -> errmsg == NULL )
@@ -6298,7 +6298,7 @@ ex_tabonly(exarg_T *eap)
62986298 void
62996299tabpage_close (int forceit )
63006300{
6301- if (window_layout_locked ())
6301+ if (window_layout_locked (CMD_tabclose ))
63026302 return ;
63036303
63046304 // First close all the windows but the current one. If that worked then
@@ -6346,7 +6346,7 @@ tabpage_close_other(tabpage_T *tp, int forceit)
63466346 static void
63476347ex_only (exarg_T * eap )
63486348{
6349- if (window_layout_locked ())
6349+ if (window_layout_locked (CMD_only ))
63506350 return ;
63516351# ifdef FEAT_GUI
63526352 need_mouse_correct = TRUE;
@@ -6373,7 +6373,7 @@ ex_hide(exarg_T *eap UNUSED)
63736373 // ":hide" or ":hide | cmd": hide current window
63746374 if (!eap -> skip )
63756375 {
6376- if (window_layout_locked ())
6376+ if (window_layout_locked (CMD_hide ))
63776377 return ;
63786378#ifdef FEAT_GUI
63796379 need_mouse_correct = TRUE;
0 commit comments