mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
fix(api): don't allow hiding aucmd_win from another tabpage (#21975)
This commit is contained in:
@@ -369,11 +369,16 @@ void nvim_win_hide(Window window, Error *err)
|
||||
tabpage_T *tabpage = win_find_tabpage(win);
|
||||
TryState tstate;
|
||||
try_enter(&tstate);
|
||||
if (tabpage == curtab) {
|
||||
|
||||
// Never close the autocommand window.
|
||||
if (is_aucmd_win(win)) {
|
||||
emsg(_(e_autocmd_close));
|
||||
} else if (tabpage == curtab) {
|
||||
win_close(win, false);
|
||||
} else {
|
||||
win_close_othertab(win, false, tabpage);
|
||||
}
|
||||
|
||||
vim_ignored = try_leave(&tstate, err);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user