*** empty log message ***
authorroot <root>
Wed, 22 Jun 2005 14:33:23 +0000 (14:33 +0000)
committerroot <root>
Wed, 22 Jun 2005 14:33:23 +0000 (14:33 +0000)
Changes
src/screen.C

diff --git a/Changes b/Changes
index c55c8788062adef78af1ae253f2f7c1bfb924c01..b4e4b0949125d99e548d919ee81b05cbb5fec21f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,4 @@
 TODO: can sth. be done about "double-wide character on last row"
-TODO: when the cursor is out-of-margin to the left, it does not treat double-width
-      chars correctly when unfocused.
 TODO: do font request caching, might help rxvtd on some machines
 TODO: safer command: keymap processing.
 TODO: "slow" rendering mode for bidi and scripts
@@ -30,6 +28,8 @@ WISH: just for fun, do shade and tint with XRender.
           cutting pieces off of characters.
         - rxvt is now more restrictive in what font heights it accepts for
           fonts that will likely overshoot or underhsoot lines.
+        - fix a cosmetic problem with the unfocused cursor on a wide character
+          at the end of the line (reported by Mikachu).
 
 5.5  Sat Apr 23 22:31:36 CEST 2005
        - re-enabled modifer state matching as in 5.3, but implement
index f91155fc1ed967635fa0024d4370c981c714fd03..5b088e7c4c92715df53111f82446c6d11d3ba712 100644 (file)
@@ -2435,17 +2435,23 @@ rxvt_term::scr_refresh (unsigned char refresh_type)
         }
       else if (oldcursor.row >= 0)
         {
+          int cursorwidth = 1;
+          int col = oldcursor.col;
+
+          while (col && screen.text[screen.cur.row + TermWin.saveLines][col] == NOCHAR)
+            col--;
+
+          while (col + cursorwidth < TermWin.ncol
+                 && drawn_text[oldcursor.row][col + cursorwidth] == NOCHAR)
+            cursorwidth++;
+
 #ifndef NO_CURSORCOLOR
           if (ISSET_PIXCOLOR (Color_cursor))
             XSetForeground (display->display, TermWin.gc, pix_colors[Color_cursor]);
 #endif
-          int cursorwidth = 1;
-          while (oldcursor.col + cursorwidth < TermWin.ncol
-                 && drawn_text[oldcursor.row][oldcursor.col + cursorwidth] == NOCHAR)
-            cursorwidth++;
 
           XDrawRectangle (display->display, drawBuffer, TermWin.gc,
-                          Col2Pixel (oldcursor.col),
+                          Col2Pixel (col),
                           Row2Pixel (oldcursor.row),
                           (unsigned int) (Width2Pixel (cursorwidth) - 1),
                           (unsigned int) (Height2Pixel (1) - TermWin.lineSpace - 1));