Merge pull request #16845 from seandewar/floaty-aucmd-win

fix(aucmd_win): ensure aucmd_win stays floating
This commit is contained in:
bfredl
2022-02-26 14:53:50 +01:00
committed by GitHub
3 changed files with 73 additions and 1 deletions

View File

@@ -4242,7 +4242,7 @@ static void win_move_into_split(win_T *wp, win_T *targetwin, int size, int flags
int height = wp->w_height;
win_T *oldwin = curwin;
if (wp == targetwin) {
if (wp == targetwin || wp == aucmd_win) {
return;
}

View File

@@ -958,6 +958,11 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
int wmh1;
bool did_set_fraction = false;
// aucmd_win should always remain floating
if (new_wp != NULL && new_wp == aucmd_win) {
return FAIL;
}
if (flags & WSP_TOP) {
oldwin = firstwin;
} else if (flags & WSP_BOT || curwin->w_floating) {
@@ -1833,6 +1838,9 @@ static void win_totop(int size, int flags)
beep_flush();
return;
}
if (curwin == aucmd_win) {
return;
}
if (curwin->w_floating) {
ui_comp_remove_grid(&curwin->w_grid_alloc);