From: Eli Zaretskii Date: Sat, 17 Apr 2010 16:02:18 +0000 (+0300) Subject: Fix cursor positioning at end of R2L line on TTY frames. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~473^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=43a03da53d3f6bc82813e070e506b0fc367456a4;p=emacs.git 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 --git a/src/ChangeLog b/src/ChangeLog index 8decf682bb8..7f081d9563f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/xdisp.c b/src/xdisp.c index 475a83449a6..d11812ceb65 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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