mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Mode init needs to be fired with the mode on the list or it will not be
resized correctly.
This commit is contained in:
7
window.c
7
window.c
@ -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);
|
||||
|
Reference in New Issue
Block a user