diff options
author | 2019-03-12 11:16:49 +0000 | |
---|---|---|
committer | 2019-03-12 11:16:49 +0000 | |
commit | 2c8678f77a1ff1cce3579aa4c6553911c9f4dde2 (patch) | |
tree | a58e089f82315aac5e2eef457bff6c90afac2435 /usr.bin/tmux/input.c | |
parent | Almost all terminals now support hardware tabs so default to OXTABS (diff) | |
download | wireguard-openbsd-2c8678f77a1ff1cce3579aa4c6553911c9f4dde2.tar.xz wireguard-openbsd-2c8678f77a1ff1cce3579aa4c6553911c9f4dde2.zip |
Allow multiple modes to be open in a pane. A stack of open modes is kept
and the previous restored when the top is exited. If a mode that is
already on the stack is entered, the existing instance is moved to the
top as the active mode rather than being opened new.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 634d8132439..9cd6275f966 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.141 2019/03/12 07:39:27 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.142 2019/03/12 11:16:50 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -805,7 +805,7 @@ input_reset(struct window_pane *wp, int clear) input_reset_cell(ictx); if (clear) { - if (wp->mode == NULL) + if (TAILQ_EMPTY(&wp->modes)) screen_write_start(&ictx->ctx, wp, &wp->base); else screen_write_start(&ictx->ctx, NULL, &wp->base); @@ -861,7 +861,7 @@ input_parse(struct window_pane *wp) * Open the screen. Use NULL wp if there is a mode set as don't want to * update the tty. */ - if (wp->mode == NULL) + if (TAILQ_EMPTY(&wp->modes)) screen_write_start(&ictx->ctx, wp, &wp->base); else screen_write_start(&ictx->ctx, NULL, &wp->base); |