*** empty log message ***
authorroot <root>
Mon, 26 Dec 2005 23:02:34 +0000 (23:02 +0000)
committerroot <root>
Mon, 26 Dec 2005 23:02:34 +0000 (23:02 +0000)
Changes
src/screen.C
src/table/iso8859_7.h

diff --git a/Changes b/Changes
index 620425f2358d2afb64e82108e94e33ad9899083e..221932d820fade1991255462ae9330d3b49c648b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -13,6 +13,8 @@ WISH: just for fun, do shade and tint with XRender.
 6.1
        - fix a crash when the selection scrolls out of the scrollback
           while the user still drags.
+        - selections that were partially scrolled out of the window were
+          not drawn correctly.
 
 6.0  Sat Dec 24 13:58:56 CET 2005
        - make it compile without SMART_RESIZE again.
index e285c855ed1dfd3eb94b298621a5f15df87aab8d..26c19a245d192db24b074236bcf3b2d7a483b1e7 100644 (file)
@@ -354,6 +354,7 @@ rxvt_term::scr_reset ()
                 }
 
               qline->l = llen < ncol ? llen : MOD (llen - 1, ncol) + 1;
+              printf ("qline->l %d = llen %d < ncol %d ? %d : MOD %d\n", qline->l,llen,ncol,llen,MOD (llen - 1, ncol) + 1);//D
               scr_blank_line (*qline, qline->l, ncol - qline->l, DEFAULT_RSTYLE);
             }
           while (p != pend && q > 0);
@@ -632,7 +633,10 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count)
         }
 
       for (int i = count; i--; )
-        scr_blank_screen_mem (ROW(row2 - i), rstyle);
+        {
+          ROW(row2 - i).l = 0;
+          scr_blank_screen_mem (ROW(row2 - i), rstyle);
+        }
       
       if ((options & Opt_scrollWithBuffer)
           && view_start != 0
@@ -735,7 +739,7 @@ rxvt_term::scr_add_lines (const unicode_t *str, int nlines, int len)
 
       if (c < 0x20)
         if (c == C0_LF)
-          {          
+          {
             if (!line->is_longer ())      /* XXX: think about this */
               max_it (line->l, screen.cur.col);
 
@@ -1285,8 +1289,8 @@ rxvt_term::scr_erase_screen (int mode)
 
   for (; num--; row++)
     {
-      scr_blank_screen_mem (ROW (row), rstyle);
       ROW (row).l = 0;
+      scr_blank_screen_mem (ROW (row), rstyle);
       scr_blank_line (drawn_buf [row], 0, ncol, ren);
     }
 }
@@ -2454,7 +2458,7 @@ rxvt_term::scr_reverse_selection ()
           else
             {
               col = 0;
-              row = view_start;
+              row = -view_start;
             }
 
           for (; row < min (selection.end.row, view_end); row++, col = 0)
index d1c1db1e4be3e32376e0d41c8d039a261b862abd..332dd4f6a19a8584d527612b7e83cf2488866ccd 100644 (file)
@@ -8,11 +8,12 @@ static const uint8_t iso8859_7_f_0[] = {
   0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0x00, 0x00, 0xb7, 0x00, 0x00, 0x00, 0xbb, 0x00, 0xbd
 };
 static const uint8_t iso8859_7_f_768[] = {
-  0xb4, 0xb5, 0xb6, 0x00, 0xb8, 0xb9, 0xba, 0x00, 0xbc, 0x00, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3,
-  0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x00, 0xd3,
-  0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3,
-  0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3,
-  0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe
+  0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0xb5, 0xb6, 0x00, 0xb8, 0xb9,
+  0xba, 0x00, 0xbc, 0x00, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
+  0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x00, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
+  0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
+  0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
+  0xfa, 0xfb, 0xfc, 0xfd, 0xfe
 };
 
 static uint32_t cs_iso8859_7_from_unicode (unicode_t unicode) {
@@ -20,10 +21,12 @@ static uint32_t cs_iso8859_7_from_unicode (unicode_t unicode) {
     if (unicode == 0x2015) return 0x00af;
     if (unicode == 0x2018) return 0x00a1;
     if (unicode == 0x2019) return 0x00a2;
+    if (unicode == 0x20ac) return 0x00a4;
+    if (unicode == 0x20af) return 0x00a5;
     if (0x00a0 <= unicode && unicode <= 0x00bd)
       return iso8859_7_f_0[unicode - 0x00a0] == 0 ? NOCHAR : iso8859_7_f_0[unicode - 0x00a0];
-    if (0x0384 <= unicode && unicode <= 0x03ce)
-      return iso8859_7_f_768[unicode - 0x0384] == 0 ? NOCHAR : iso8859_7_f_768[unicode - 0x0384];
+    if (0x037a <= unicode && unicode <= 0x03ce)
+      return iso8859_7_f_768[unicode - 0x037a] == 0 ? NOCHAR : iso8859_7_f_768[unicode - 0x037a];
     return NOCHAR;
 }