From 017ea8192415cbd091cd53075b168fa702c3b922 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 1 May 2010 13:49:09 +0300 Subject: [PATCH] Fix display of R2L continued lines in partial-width windows on a TTY. xdisp.c: (extend_face_to_end_of_line): In almost-filled rows, extend only if the row is R2L and not continued. --- src/ChangeLog | 2 ++ src/xdisp.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 13b2a29e74d..a5548ff16fc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * xdisp.c (find_row_end): New function, refactored from display_line. (display_line): Use it. + (extend_face_to_end_of_line): In almost-filled rows, extend only + if the row is R2L and not continued. 2010-04-27 Eli Zaretskii diff --git a/src/xdisp.c b/src/xdisp.c index 017aa690023..45e6b83ec29 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16948,8 +16948,13 @@ extend_face_to_end_of_line (it) /* 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)) + 1-``pixel'' wide, so they hit the equality too early. This grace + is needed only for R2L rows that are not continued, to produce + one extra blank where we could display the cursor. */ + if (it->current_x >= it->last_visible_x + + (!FRAME_WINDOW_P (f) + && it->glyph_row->reversed_p + && !it->glyph_row->continued_p)) return; /* Face extension extends the background and box of IT->face_id -- 2.39.2