diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-03-31 07:00:35 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-03-31 07:00:35 +0000 |
commit | 180675063ddcc3c7cbd9c69efdc519bf5e459fc6 (patch) | |
tree | 86d5ab8c385cf5f0c2225430e512b438c7faaab7 /usr.bin/tmux/format.c | |
parent | 7f69772efaa90720cbec44b64ba048c87796f739 (diff) |
Move alternate screen into the screen rather than the pane.
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r-- | usr.bin/tmux/format.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 1bb60f13603..e5b01411955 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.230 2020/03/28 09:39:27 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.231 2020/03/31 07:00:34 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2729,9 +2729,11 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) format_add(ft, "scroll_region_upper", "%u", wp->base.rupper); format_add(ft, "scroll_region_lower", "%u", wp->base.rlower); - format_add(ft, "alternate_on", "%d", wp->saved_grid ? 1 : 0); - format_add(ft, "alternate_saved_x", "%u", wp->saved_cx); - format_add(ft, "alternate_saved_y", "%u", wp->saved_cy); + format_add(ft, "alternate_on", "%d", wp->base.saved_grid != NULL); + if (wp->base.saved_cx != UINT_MAX) + format_add(ft, "alternate_saved_x", "%u", wp->base.saved_cx); + if (wp->base.saved_cy != UINT_MAX) + format_add(ft, "alternate_saved_y", "%u", wp->base.saved_cy); format_add(ft, "cursor_flag", "%d", !!(wp->base.mode & MODE_CURSOR)); |