diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-13 10:43:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-13 10:43:52 +0000 |
commit | 359285928b63605a130990699c33c8af42be9fd2 (patch) | |
tree | d41c53755083b3527066a65d7d5542141bd045e2 /window.c | |
parent | 0b788a3d61994e5a7a98e36d104c130dcbb5e0c9 (diff) | |
download | rtmux-359285928b63605a130990699c33c8af42be9fd2.tar.gz rtmux-359285928b63605a130990699c33c8af42be9fd2.tar.bz2 rtmux-359285928b63605a130990699c33c8af42be9fd2.zip |
Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full
screen interactive programs to preserve the screen contents. When activated, it
saves a copy of the visible grid and disables scrolling into and resizing out
of the history; when deactivated the visible data is restored and the history
reenabled.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -407,6 +407,8 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit) wp->sx = sx; wp->sy = sy; + wp->saved_grid = NULL; + screen_init(&wp->base, sx, sy, hlimit); wp->screen = &wp->base; @@ -425,6 +427,8 @@ window_pane_destroy(struct window_pane *wp) window_pane_reset_mode(wp); screen_free(&wp->base); + if (wp->saved_grid != NULL) + grid_destroy(wp->saved_grid); buffer_destroy(wp->in); buffer_destroy(wp->out); |