repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 70966149829060b1d299b1a39d9fd08ed461ba62:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 70966149829060b1d299b1a39d9fd08ed461ba62
Author: Marc Lehmann 
Date:   Sat Jan 28 14:23:16 2006 +0000

    *** empty log message ***

diff --git a/src/screen.C b/src/screen.C
index 67b02034282a4400f44b58f3c1187b7e2626049e..
index ..a57b25e37c7b727bd1ca85c5ff9d4e6adef0c01b 100644
--- a/src/screen.C
+++ b/src/screen.C
@@ -128,7 +128,7 @@ rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend

   l.touch ();

-  efs &= ~RS_baseattrMask;
+  efs &= ~RS_baseattrMask; // remove italic etc. fontstyles
   efs = SET_FONT (efs, FONTSET (efs)->find_font (' '));

   text_t *et = l.t + col;
@@ -642,7 +642,20 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW

       // erase newly scrolled-in lines
       for (int i = count; i--; )
-        scr_blank_screen_mem (ROW(nrow - 1 - i), rstyle);
+        {
+          line_t &l = ROW(nrow - 1 - i);
+
+          // optimize if already cleared, can be significant on slow machines
+          // could be rolled into scr_blank_screen_mem
+          if (l.r && l.l < ncol - 1 && !((l.r[l.l + 1] ^ rstyle) & RS_bgMask))
+            {
+              scr_blank_line (l, 0, l.l, rstyle);
+              l.l = 0;
+              l.f = 0;
+            }
+          else
+            scr_blank_screen_mem (l, rstyle);
+        }

       // now copy lines below the scroll region bottom to the
       // bottom of the screen again, so they look as if they

-----END OF PAGE-----