Fix alternate-screen bugs introduced by move to B-trees. Alternate
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 17 Apr 2001 08:53:31 +0000 (08:53 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 17 Apr 2001 08:53:31 +0000 (08:53 +0000)
screen wasn't being correctly cleared on creation, and also wasn't
inhibiting scrollback like it should have.

git-svn-id: svn://svn.tartarus.org/sgt/putty@1061 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index 7d6c727..ab1b225 100644 (file)
@@ -369,7 +369,7 @@ void term_size(int newrows, int newcols, int newsavelines) {
     for (i=0; i<newrows; i++) {
        line = smalloc(TSIZE * (newcols+1));
        for (j = 0; j <= newcols; j++)
-           line[i] = erase_char;
+           line[j] = erase_char;
        addpos234(newalt, line, i);
     }
     if (alt_screen) {
@@ -466,7 +466,7 @@ static void scroll (int topline, int botline, int lines, int sb) {
     unsigned long *line, *line2;
     int i;
 
-    if (topline != 0)
+    if (topline != 0 || alt_which != 0)
        sb = FALSE;
 
     if (lines < 0) {