xdisp.c (extend_face_to_end_of_line): Fix face extension at ZV.
term.c (produce_special_glyphs): Mirror the backslash
continuation character in R2L lines.
xdisp.c (set_cursor_from_row, display_line): Use
MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
row->continuation_lines_width.
fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
of continuation indicators on the fringes.
2010-04-17 Eli Zaretskii <eliz@gnu.org>
+ * xdisp.c (extend_face_to_end_of_line): Fix face extension at ZV.
+
+ * term.c (produce_special_glyphs): Mirror the backslash
+ continuation character in R2L lines.
+
+ * xdisp.c (set_cursor_from_row, display_line): Use
+ MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
+ row->continuation_lines_width.
+
+ * fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
+ of continuation indicators on the fringes.
+
* xdisp.c (next_element_from_buffer): Don't call
bidi_paragraph_init if we are at ZV. Fixes a crash when reseated to
ZV by try_window_reusing_current_matrix.
: LEFT_FRINGE (2, Qtop, 0));
else if (row->indicate_eob_p && EQ (boundary_bot, Qleft))
left = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p);
- else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
+ else if ((!row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row))
+ || (row->reversed_p && row->continued_p))
left = LEFT_FRINGE (4, Qcontinuation, 0);
else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft))
left = LEFT_FRINGE (5, Qempty_line, 0);
: RIGHT_FRINGE (2, Qtop, 0));
else if (row->indicate_eob_p && EQ (boundary_bot, Qright))
right = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p);
- else if (row->continued_p)
+ else if ((!row->reversed_p && row->continued_p)
+ || (row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row)))
right = RIGHT_FRINGE (4, Qcontinuation, 0);
else if (row->indicate_top_line_p && EQ (arrow_top, Qright))
right = RIGHT_FRINGE (6, Qup, 0);
if (what == IT_CONTINUATION)
{
- /* Continuation glyph. */
- SET_GLYPH_FROM_CHAR (glyph, '\\');
+ /* Continuation glyph. For R2L lines, we mirror it by hand. */
+ if (it->bidi_it.paragraph_dir == R2L)
+ SET_GLYPH_FROM_CHAR (glyph, '/');
+ else
+ SET_GLYPH_FROM_CHAR (glyph, '\\');
if (it->dp
&& (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc))
&& GLYPH_CODE_CHAR_VALID_P (gc))
{
+ /* FIXME: Should we mirror GC for R2L lines? */
SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
}
&& (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc))
&& GLYPH_CODE_CHAR_VALID_P (gc))
{
+ /* FIXME: Should we mirror GC for R2L lines? */
SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
}
/* that candidate is not the row we are processing */
&& MATRIX_ROW (matrix, w->cursor.vpos) != row
/* the row we are processing is part of a continued line */
- && (row->continued_p || row->continuation_lines_width)
+ && (row->continued_p || MATRIX_ROW_CONTINUATION_LINE_P (row))
/* Make sure cursor.vpos specifies a row whose start and end
charpos occlude point. This is because some callers of this
function leave cursor.vpos at the row where the cursor was
saved_avoid_cursor = it->avoid_cursor_p;
it->avoid_cursor_p = 1;
saved_face_id = it->face_id;
- /* The last row should get the default face, to avoid
- painting the rest of the window with the region face,
- if the region ends at ZV. */
+ /* The last row's stretch glyph should get the default
+ face, to avoid painting the rest of the window with
+ the region face, if the region ends at ZV. */
if (it->glyph_row->ends_at_zv_p)
it->face_id = DEFAULT_FACE_ID;
else
it->object = make_number (0);
it->c = ' ';
it->len = 1;
- it->face_id = face->id;
+ /* The last row's blank glyphs should get the default face, to
+ avoid painting the rest of the window with the region face,
+ if the region ends at ZV. */
+ if (it->glyph_row->ends_at_zv_p)
+ it->face_id = DEFAULT_FACE_ID;
+ else
+ it->face_id = face->id;
PRODUCE_GLYPHS (it);
*it = save_it;
}
else if (!row->continued_p
- && row->continuation_lines_width
+ && MATRIX_ROW_CONTINUATION_LINE_P (row)
&& it->eol_pos.charpos > 0)
{
/* Last row of a continued line. Use the position