# HG changeset patch # User Eli Zaretskii # Date 1271520138 -10800 # Node ID 1afd4d56683f47d8c700f2262e16f6fa9450e8ff # Parent 5dc04900cbd71e4fb19b41e80a1cd81f6143b173 Fix cursor positioning at end of R2L line on TTY frames. xdisp.c (extend_face_to_end_of_line): Fix off-by-one error on TTY frames in testing whether a line needs face extension. diff -r 5dc04900cbd7 -r 1afd4d56683f src/ChangeLog --- a/src/ChangeLog Sat Apr 17 15:33:05 2010 +0300 +++ b/src/ChangeLog Sat Apr 17 19:02:18 2010 +0300 @@ -1,5 +1,8 @@ 2010-04-17 Eli Zaretskii + * 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 diff -r 5dc04900cbd7 -r 1afd4d56683f src/xdisp.c --- a/src/xdisp.c Sat Apr 17 15:33:05 2010 +0300 +++ b/src/xdisp.c Sat Apr 17 19:02:18 2010 +0300 @@ -16803,8 +16803,10 @@ 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