aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-13 10:43:52 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-13 10:43:52 +0000
commit359285928b63605a130990699c33c8af42be9fd2 (patch)
treed41c53755083b3527066a65d7d5542141bd045e2 /tmux.h
parent0b788a3d61994e5a7a98e36d104c130dcbb5e0c9 (diff)
downloadrtmux-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 'tmux.h')
-rw-r--r--tmux.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tmux.h b/tmux.h
index 28778e9f..481b0ca7 100644
--- a/tmux.h
+++ b/tmux.h
@@ -443,6 +443,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;
@@ -614,6 +617,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;
@@ -1328,6 +1336,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);