ref: 7cd9c1fdc61858a0c067eaf4094f318c8eeffc94
parent: 89c893dffcc47d0079c797dca8390c267cab4887
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sat Nov 10 02:56:39 EST 2012
vt: on resize, restore screen using history buffer
--- a/sys/src/cmd/vt/main.c
+++ b/sys/src/cmd/vt/main.c
@@ -579,6 +579,8 @@
olines = 0;
exportsize();
clear(screen->r);
+ if(resize_flag > 1)
+ backup(backc);
resize_flag = 0;
werrstr(""); /* clear spurious error messages */}
@@ -684,7 +686,13 @@
register char *cp;
eresized(0);
- n = 3*(count+1)*ymax/4;
+ if(count == 0 && !pagemode) {+ n = ymax;
+ nbacklines = HISTSIZ; /* make sure we scroll to the very end */
+ } else{+ n = 3*(count+1)*ymax/4;
+ nbacklines = ymax-1;
+ }
cp = histp;
atend = 0;
while (n >= 0) {@@ -702,7 +710,6 @@
if(cp >= &hist[HISTSIZ])
cp = hist;
backp = cp;
- nbacklines = ymax-2;
}
Point
--
⑨