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.
This commit is contained in:
Nicholas Marriott
2009-07-13 10:43:52 +00:00
parent 0b788a3d61
commit 359285928b
6 changed files with 153 additions and 9 deletions

View File

@ -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;
}