diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:40:33 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:40:33 +0000 |
commit | e63567d51ce76e45013b4a392eba1443fd5b3493 (patch) | |
tree | 12a2ff2c3c03c37d7a7c15adc08de027cc07bd45 /tmux.h | |
parent | f41ef2198ba430a7b376c205ad799fcc0f5b2685 (diff) | |
download | rtmux-e63567d51ce76e45013b4a392eba1443fd5b3493.tar.gz rtmux-e63567d51ce76e45013b4a392eba1443fd5b3493.tar.bz2 rtmux-e63567d51ce76e45013b4a392eba1443fd5b3493.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 'tmux.h')
-rw-r--r-- | tmux.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.358 2009-07-14 06:40:03 nicm Exp $ */ +/* $Id: tmux.h,v 1.359 2009-07-14 06:40:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -442,6 +442,9 @@ struct grid_utf8 { /* Entire grid of cells. */ struct grid { + int flags; +#define GRID_HISTORY 0x1 /* scroll lines into history */ + u_int sx; u_int sy; @@ -613,6 +616,11 @@ struct window_pane { struct screen *screen; struct screen base; + /* Saved in alternative screen mode. */ + u_int saved_cx; + u_int saved_cy; + struct grid *saved_grid; + const struct window_mode *mode; void *modedata; @@ -1327,6 +1335,8 @@ void grid_clear_lines(struct grid *, u_int, u_int); void grid_move_lines(struct grid *, u_int, u_int, u_int); void grid_move_cells(struct grid *, u_int, u_int, u_int, u_int); char *grid_string_cells(struct grid *, u_int, u_int, u_int); +void grid_duplicate_lines( + struct grid *, u_int, struct grid *, u_int, u_int); /* grid-view.c */ const struct grid_cell *grid_view_peek_cell(struct grid *, u_int, u_int); |