]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Oh, _that's_ why that `if' had the sense it did. Good grief.
authorSimon Tatham <anakin@pobox.com>
Tue, 28 Jan 2003 09:26:32 +0000 (09:26 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 28 Jan 2003 09:26:32 +0000 (09:26 +0000)
Apparently I used to rely on the fact that the same `erase_char'
used to wipe parts of the screen was also a good value to use for
resetting line attributes. Should now be more robust against future
reorganisations of the ATTR_* bit fields.

[originally from svn r2740]

terminal.c

index e3e8cc0ff7f40b284d5d94ed60f3772333427a9a..6e056467dfb21f3dc4e7391bc706f99cfefbd376 100644 (file)
@@ -975,8 +975,10 @@ static void erase_lots(Terminal *term,
     ldata = lineptr(start.y);
     while (poslt(start, end)) {
        if (start.x == term->cols) {
-            if (erase_lattr)
-                ldata[start.x] &= ~(LATTR_WRAPPED | LATTR_WRAPPED2);
+            if (!erase_lattr)
+                ldata[start.x] = ~(LATTR_WRAPPED | LATTR_WRAPPED2);
+            else
+                ldata[start.x] = LATTR_NORM;
         } else {
            ldata[start.x] = term->erase_char;
         }