summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/grid-view.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-13 10:43:52 +0000
committernicm <nicm@openbsd.org>2009-07-13 10:43:52 +0000
commit953d773c2d1670addaf5d087f9b8c5e2e0f834e3 (patch)
tree7214a835bd80dbb0ee7edfb216df61c54030006f /usr.bin/tmux/grid-view.c
parentsync (diff)
downloadwireguard-openbsd-953d773c2d1670addaf5d087f9b8c5e2e0f834e3.tar.xz
wireguard-openbsd-953d773c2d1670addaf5d087f9b8c5e2e0f834e3.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 'usr.bin/tmux/grid-view.c')
-rw-r--r--usr.bin/tmux/grid-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid-view.c b/usr.bin/tmux/grid-view.c
index 76017828c50..70aee107187 100644
--- a/usr.bin/tmux/grid-view.c
+++ b/usr.bin/tmux/grid-view.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid-view.c,v 1.5 2009/07/09 07:58:14 nicm Exp $ */
+/* $OpenBSD: grid-view.c,v 1.6 2009/07/13 10:43:52 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;
}