diff options
author | 2019-03-18 15:25:36 +0000 | |
---|---|---|
committer | 2019-03-18 15:25:36 +0000 | |
commit | 610f37cff0667328a1921c2df575e02e9c357c64 (patch) | |
tree | 0fc73f811771566932d9ce60a20cfb0fe9e666d3 /usr.bin/tmux/window.c | |
parent | Add format variables for the default formats for the various modes (diff) | |
download | wireguard-openbsd-610f37cff0667328a1921c2df575e02e9c357c64.tar.xz wireguard-openbsd-610f37cff0667328a1921c2df575e02e9c357c64.zip |
Mode init needs to be fired with the mode on the list or it will not be
resized correctly.
Diffstat (limited to '')
-rw-r--r-- | usr.bin/tmux/window.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 6f4adbc51f3..b3cb7329cb1 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.222 2019/03/18 14:10:25 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.223 2019/03/18 15:25:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |