diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-10 07:56:39 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-10 07:56:39 +0100 |
commit | 00daf47137edba4580d0db15d2a18a7112dbe133 (patch) | |
tree | b1f377f937cd4b6529f215ef5f0d7333fddbe050 | |
parent | 0ad8548b703aa63dd40095027937437920cbba57 (diff) | |
download | plan9front-00daf47137edba4580d0db15d2a18a7112dbe133.tar.xz |
vt: on resize, restore screen using history buffer
-rw-r--r-- | sys/src/cmd/vt/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/src/cmd/vt/main.c b/sys/src/cmd/vt/main.c index a342a8984..739a1c422 100644 --- a/sys/src/cmd/vt/main.c +++ b/sys/src/cmd/vt/main.c @@ -579,6 +579,8 @@ resize(void) olines = 0; exportsize(); clear(screen->r); + if(resize_flag > 1) + backup(backc); resize_flag = 0; werrstr(""); /* clear spurious error messages */ } @@ -684,7 +686,13 @@ backup(int count) 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 @@ backup(int count) if(cp >= &hist[HISTSIZ]) cp = hist; backp = cp; - nbacklines = ymax-2; } Point |