Mode init needs to be fired with the mode on the list or it will not be

resized correctly.
This commit is contained in:
nicm
2019-03-18 15:25:36 +00:00
parent 2628af573d
commit d738d51688
2 changed files with 7 additions and 7 deletions

View File

@ -1247,16 +1247,17 @@ window_pane_set_mode(struct window_pane *wp, const struct window_mode *mode,
if (wme->mode == mode)
break;
}
if (wme != NULL)
if (wme != NULL) {
TAILQ_REMOVE(&wp->modes, wme, entry);
else {
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
} else {
wme = xcalloc(1, sizeof *wme);
wme->wp = wp;
wme->mode = mode;
wme->prefix = 1;
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
wme->screen = wme->mode->init(wme, fs, args);
}
TAILQ_INSERT_HEAD(&wp->modes, wme, entry);
wp->screen = wme->screen;
wp->flags |= (PANE_REDRAW|PANE_CHANGED);