summaryrefslogtreecommitdiffstats
path: root/grid-view.c
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 /grid-view.c
parent0b788a3d61994e5a7a98e36d104c130dcbb5e0c9 (diff)
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 'grid-view.c')
-rw-r--r--grid-view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/grid-view.c b/grid-view.c
index 5ad8fc2f..bf58c61f 100644
--- a/grid-view.c
+++ b/grid-view.c
@@ -92,7 +92,7 @@ grid_view_scroll_region_up(struct grid *gd, u_int rupper, u_int rlower)
{
GRID_DEBUG(gd, "rupper=%u, rlower=%u", rupper, rlower);
- if (rupper == 0 && rlower == gd->sy - 1) {
+ if (gd->flags & GRID_HISTORY && rupper == 0 && rlower == gd->sy - 1) {
grid_scroll_line(gd);
return;
}