feat(api): allow floats to be opened in non-current tabpage (#28480)

\
This commit is contained in:
Will Hopkins
2024-04-24 18:14:05 -07:00
committed by GitHub
parent c32fcd1ed5
commit 16513b3033
6 changed files with 95 additions and 28 deletions

View File

@@ -5127,7 +5127,14 @@ win_T *win_alloc(win_T *after, bool hidden)
block_autocmds();
// link the window in the window list
if (!hidden) {
win_append(after, new_wp, NULL);
tabpage_T *tp = NULL;
if (after) {
tp = win_find_tabpage(after);
if (tp == curtab) {
tp = NULL;
}
}
win_append(after, new_wp, tp);
}
new_wp->w_wincol = 0;