diff options
author | nicm <nicm> | 2020-04-07 13:55:24 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-04-07 13:55:24 +0000 |
commit | 1c8f7c1f7afcc7d2a9fcef8d38e6c0e4451da659 (patch) | |
tree | 0579e2927793fc060a49d4e1682a4e65d3975f58 | |
parent | eff881b15aba52841c7b41ff6b5dca3cf6984077 (diff) | |
download | rtmux-1c8f7c1f7afcc7d2a9fcef8d38e6c0e4451da659.tar.gz rtmux-1c8f7c1f7afcc7d2a9fcef8d38e6c0e4451da659.tar.bz2 rtmux-1c8f7c1f7afcc7d2a9fcef8d38e6c0e4451da659.zip |
Do not restore history flag if it was never set.
-rw-r--r-- | screen.c | 4 | ||||
-rw-r--r-- | tmux.h | 1 |
2 files changed, 4 insertions, 1 deletions
@@ -536,6 +536,7 @@ screen_alternate_on(struct screen *s, struct grid_cell *gc, int cursor) grid_view_clear(s->grid, 0, 0, sx, sy, 8); + s->saved_flags = s->grid->flags; s->grid->flags &= ~GRID_HISTORY; } @@ -579,7 +580,8 @@ screen_alternate_off(struct screen *s, struct grid_cell *gc, int cursor) * Turn history back on (so resize can use it) and then resize back to * the current size. */ - s->grid->flags |= GRID_HISTORY; + if (s->saved_flags & GRID_HISTORY) + s->grid->flags |= GRID_HISTORY; if (sy > s->saved_grid->sy || sx != s->saved_grid->sx) screen_resize(s, sx, sy, 1); @@ -761,6 +761,7 @@ struct screen { u_int saved_cy; struct grid *saved_grid; struct grid_cell saved_cell; + int saved_flags; bitstr_t *tabs; struct screen_sel *sel; |