diff options
author | nicm <nicm> | 2019-03-18 15:25:36 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-03-18 15:25:36 +0000 |
commit | d738d5168804405240a3f36b6f410baee39cd9e0 (patch) | |
tree | c7459e790d1efb2a82a4078ad2b16af08e7d0399 /window.c | |
parent | 2628af573d98f7bdd4db02c7a80c860b867a45fb (diff) | |
download | rtmux-d738d5168804405240a3f36b6f410baee39cd9e0.tar.gz rtmux-d738d5168804405240a3f36b6f410baee39cd9e0.tar.bz2 rtmux-d738d5168804405240a3f36b6f410baee39cd9e0.zip |
Mode init needs to be fired with the mode on the list or it will not be
resized correctly.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |