]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix cursor positioning at end of R2L line on TTY frames.
authorEli Zaretskii <eliz@gnu.org>
Sat, 17 Apr 2010 16:02:18 +0000 (19:02 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 17 Apr 2010 16:02:18 +0000 (19:02 +0300)
 xdisp.c (extend_face_to_end_of_line): Fix off-by-one error on
 TTY frames in testing whether a line needs face extension.

src/ChangeLog
src/xdisp.c

index 8decf682bb8db35dc60bf62c36f7f4a7e03d14c3..7f081d9563fd11c5e325a7547917830b0aa72ff6 100644 (file)
@@ -1,5 +1,8 @@
 2010-04-17  Eli Zaretskii  <eliz@gnu.org>
 
+       * xdisp.c (extend_face_to_end_of_line): Fix off-by-one error on
+       TTY frames in testing whether a line needs face extension.
+
        * xdisp.c (extend_face_to_end_of_line): Fix face extension at ZV.
 
        * term.c (produce_special_glyphs): Mirror the backslash
index 475a83449a667248701030b33490aa62365391b3..d11812ceb6519b74b9c06ad6e9ff9f59154fcb15 100644 (file)
@@ -16803,8 +16803,10 @@ extend_face_to_end_of_line (it)
   struct face *face;
   struct frame *f = it->f;
 
-  /* If line is already filled, do nothing.  */
-  if (it->current_x >= it->last_visible_x)
+  /* If line is already filled, do nothing.  Non window-system frames
+     get a grace of one more ``pixel'' because their characters are
+     1-``pixel'' wide, so they hit the equality too early.  */
+  if (it->current_x >= it->last_visible_x + !FRAME_WINDOW_P (f))
     return;
 
   /* Face extension extends the background and box of IT->face_id