Merge pull request #6619 from bfredl/floating

Floating windows in TUI and Remote UI
This commit is contained in:
Björn Linse
2019-03-02 17:26:50 +01:00
committed by GitHub
30 changed files with 4068 additions and 219 deletions

View File

@@ -6279,6 +6279,9 @@ void tabpage_close(int forceit)
{
// First close all the windows but the current one. If that worked then
// close the last window in this tab, that will close it.
while (curwin->w_floating) {
ex_win_close(forceit, curwin, NULL);
}
if (!ONE_WINDOW) {
close_others(true, forceit);
}
@@ -6303,8 +6306,8 @@ void tabpage_close_other(tabpage_T *tp, int forceit)
/* Limit to 1000 windows, autocommands may add a window while we close
* one. OK, so I'm paranoid... */
while (++done < 1000) {
sprintf((char *)prev_idx, "%i", tabpage_index(tp));
wp = tp->tp_firstwin;
snprintf((char *)prev_idx, sizeof(prev_idx), "%i", tabpage_index(tp));
wp = tp->tp_lastwin;
ex_win_close(forceit, wp, tp);
/* Autocommands may delete the tab page under our fingers and we may
@@ -6325,6 +6328,7 @@ static void ex_only(exarg_T *eap)
{
win_T *wp;
int wnr;
if (eap->addr_count > 0) {
wnr = eap->line2;
for (wp = firstwin; --wnr > 0;) {
@@ -6333,6 +6337,10 @@ static void ex_only(exarg_T *eap)
else
wp = wp->w_next;
}
} else {
wp = curwin;
}
if (wp != curwin) {
win_goto(wp);
}
close_others(TRUE, eap->forceit);