diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-19 13:14:10 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-19 13:14:10 +0000 |
commit | 9fda81515b26ecd3c1e99f95334aaed3f7b6fea3 (patch) | |
tree | 12a4d3d606b0ee1d1dda7aa9799f5286462153cb /src/ex_docmd.c | |
parent | 361895d2a15b4b0bbbb4c009261eab5b3d69ebf1 (diff) | |
download | vim-git-9fda81515b26ecd3c1e99f95334aaed3f7b6fea3.tar.gz |
patch 9.0.0909: error message for layout change does not match actionv9.0.0909
Problem: Error message for layout change does not match action.
Solution: Pass the command to where the error is given. (closes #11573)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index ac4012725..bb4a83163 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -6055,7 +6055,7 @@ ex_win_close( emsg(_(e_cannot_close_autocmd_or_popup_window)); return; } - if (window_layout_locked()) + if (window_layout_locked(CMD_close)) return; need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1); @@ -6229,7 +6229,7 @@ ex_tabclose(exarg_T *eap) cmdwin_result = K_IGNORE; else if (first_tabpage->tp_next == NULL) emsg(_(e_cannot_close_last_tab_page)); - else if (!window_layout_locked()) + else if (!window_layout_locked(CMD_tabclose)) { tab_number = get_tabpage_arg(eap); if (eap->errmsg == NULL) @@ -6265,7 +6265,7 @@ ex_tabonly(exarg_T *eap) cmdwin_result = K_IGNORE; else if (first_tabpage->tp_next == NULL) msg(_("Already only one tab page")); - else if (!window_layout_locked()) + else if (!window_layout_locked(CMD_tabonly)) { tab_number = get_tabpage_arg(eap); if (eap->errmsg == NULL) @@ -6298,7 +6298,7 @@ ex_tabonly(exarg_T *eap) void tabpage_close(int forceit) { - if (window_layout_locked()) + if (window_layout_locked(CMD_tabclose)) return; // 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) static void ex_only(exarg_T *eap) { - if (window_layout_locked()) + if (window_layout_locked(CMD_only)) return; # ifdef FEAT_GUI need_mouse_correct = TRUE; @@ -6373,7 +6373,7 @@ ex_hide(exarg_T *eap UNUSED) // ":hide" or ":hide | cmd": hide current window if (!eap->skip) { - if (window_layout_locked()) + if (window_layout_locked(CMD_hide)) return; #ifdef FEAT_GUI need_mouse_correct = TRUE; |