aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-04-17 15:33:05 +0300
committerEli Zaretskii2010-04-17 15:33:05 +0300
commit26cdf52838e1711c9659d6d3908a24805c08925b (patch)
tree39a5bead6afc4810a823c7d91a4fb916699b8634 /src
parent459035295cb9de3fcd37af915200f766031f1540 (diff)
downloademacs-26cdf52838e1711c9659d6d3908a24805c08925b.tar.gz
emacs-26cdf52838e1711c9659d6d3908a24805c08925b.zip
Mirror continuation indicators for R2L lines; fix face extension on TTY.
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/fringe.c6
-rw-r--r--src/term.c9
-rw-r--r--src/xdisp.c18
4 files changed, 35 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3d5ba045168..8decf682bb8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,17 @@
12010-04-17 Eli Zaretskii <eliz@gnu.org> 12010-04-17 Eli Zaretskii <eliz@gnu.org>
2 2
3 * xdisp.c (extend_face_to_end_of_line): Fix face extension at ZV.
4
5 * term.c (produce_special_glyphs): Mirror the backslash
6 continuation character in R2L lines.
7
8 * xdisp.c (set_cursor_from_row, display_line): Use
9 MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
10 row->continuation_lines_width.
11
12 * fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
13 of continuation indicators on the fringes.
14
3 * xdisp.c (next_element_from_buffer): Don't call 15 * xdisp.c (next_element_from_buffer): Don't call
4 bidi_paragraph_init if we are at ZV. Fixes a crash when reseated to 16 bidi_paragraph_init if we are at ZV. Fixes a crash when reseated to
5 ZV by try_window_reusing_current_matrix. 17 ZV by try_window_reusing_current_matrix.
diff --git a/src/fringe.c b/src/fringe.c
index 335dde03c8a..cfb944d58d1 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1090,7 +1090,8 @@ update_window_fringes (w, keep_current_p)
1090 : LEFT_FRINGE (2, Qtop, 0)); 1090 : LEFT_FRINGE (2, Qtop, 0));
1091 else if (row->indicate_eob_p && EQ (boundary_bot, Qleft)) 1091 else if (row->indicate_eob_p && EQ (boundary_bot, Qleft))
1092 left = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p); 1092 left = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p);
1093 else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) 1093 else if ((!row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row))
1094 || (row->reversed_p && row->continued_p))
1094 left = LEFT_FRINGE (4, Qcontinuation, 0); 1095 left = LEFT_FRINGE (4, Qcontinuation, 0);
1095 else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft)) 1096 else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft))
1096 left = LEFT_FRINGE (5, Qempty_line, 0); 1097 left = LEFT_FRINGE (5, Qempty_line, 0);
@@ -1117,7 +1118,8 @@ update_window_fringes (w, keep_current_p)
1117 : RIGHT_FRINGE (2, Qtop, 0)); 1118 : RIGHT_FRINGE (2, Qtop, 0));
1118 else if (row->indicate_eob_p && EQ (boundary_bot, Qright)) 1119 else if (row->indicate_eob_p && EQ (boundary_bot, Qright))
1119 right = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p); 1120 right = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p);
1120 else if (row->continued_p) 1121 else if ((!row->reversed_p && row->continued_p)
1122 || (row->reversed_p && MATRIX_ROW_CONTINUATION_LINE_P (row)))
1121 right = RIGHT_FRINGE (4, Qcontinuation, 0); 1123 right = RIGHT_FRINGE (4, Qcontinuation, 0);
1122 else if (row->indicate_top_line_p && EQ (arrow_top, Qright)) 1124 else if (row->indicate_top_line_p && EQ (arrow_top, Qright))
1123 right = RIGHT_FRINGE (6, Qup, 0); 1125 right = RIGHT_FRINGE (6, Qup, 0);
diff --git a/src/term.c b/src/term.c
index 718a20d4164..31e0ad223db 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1889,12 +1889,16 @@ produce_special_glyphs (it, what)
1889 1889
1890 if (what == IT_CONTINUATION) 1890 if (what == IT_CONTINUATION)
1891 { 1891 {
1892 /* Continuation glyph. */ 1892 /* Continuation glyph. For R2L lines, we mirror it by hand. */
1893 SET_GLYPH_FROM_CHAR (glyph, '\\'); 1893 if (it->bidi_it.paragraph_dir == R2L)
1894 SET_GLYPH_FROM_CHAR (glyph, '/');
1895 else
1896 SET_GLYPH_FROM_CHAR (glyph, '\\');
1894 if (it->dp 1897 if (it->dp
1895 && (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc)) 1898 && (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc))
1896 && GLYPH_CODE_CHAR_VALID_P (gc)) 1899 && GLYPH_CODE_CHAR_VALID_P (gc))
1897 { 1900 {
1901 /* FIXME: Should we mirror GC for R2L lines? */
1898 SET_GLYPH_FROM_GLYPH_CODE (glyph, gc); 1902 SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
1899 spec_glyph_lookup_face (XWINDOW (it->window), &glyph); 1903 spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
1900 } 1904 }
@@ -1907,6 +1911,7 @@ produce_special_glyphs (it, what)
1907 && (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc)) 1911 && (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc))
1908 && GLYPH_CODE_CHAR_VALID_P (gc)) 1912 && GLYPH_CODE_CHAR_VALID_P (gc))
1909 { 1913 {
1914 /* FIXME: Should we mirror GC for R2L lines? */
1910 SET_GLYPH_FROM_GLYPH_CODE (glyph, gc); 1915 SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
1911 spec_glyph_lookup_face (XWINDOW (it->window), &glyph); 1916 spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
1912 } 1917 }
diff --git a/src/xdisp.c b/src/xdisp.c
index b278538f625..475a83449a6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12949,7 +12949,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
12949 /* that candidate is not the row we are processing */ 12949 /* that candidate is not the row we are processing */
12950 && MATRIX_ROW (matrix, w->cursor.vpos) != row 12950 && MATRIX_ROW (matrix, w->cursor.vpos) != row
12951 /* the row we are processing is part of a continued line */ 12951 /* the row we are processing is part of a continued line */
12952 && (row->continued_p || row->continuation_lines_width) 12952 && (row->continued_p || MATRIX_ROW_CONTINUATION_LINE_P (row))
12953 /* Make sure cursor.vpos specifies a row whose start and end 12953 /* Make sure cursor.vpos specifies a row whose start and end
12954 charpos occlude point. This is because some callers of this 12954 charpos occlude point. This is because some callers of this
12955 function leave cursor.vpos at the row where the cursor was 12955 function leave cursor.vpos at the row where the cursor was
@@ -16876,9 +16876,9 @@ extend_face_to_end_of_line (it)
16876 saved_avoid_cursor = it->avoid_cursor_p; 16876 saved_avoid_cursor = it->avoid_cursor_p;
16877 it->avoid_cursor_p = 1; 16877 it->avoid_cursor_p = 1;
16878 saved_face_id = it->face_id; 16878 saved_face_id = it->face_id;
16879 /* The last row should get the default face, to avoid 16879 /* The last row's stretch glyph should get the default
16880 painting the rest of the window with the region face, 16880 face, to avoid painting the rest of the window with
16881 if the region ends at ZV. */ 16881 the region face, if the region ends at ZV. */
16882 if (it->glyph_row->ends_at_zv_p) 16882 if (it->glyph_row->ends_at_zv_p)
16883 it->face_id = DEFAULT_FACE_ID; 16883 it->face_id = DEFAULT_FACE_ID;
16884 else 16884 else
@@ -16909,7 +16909,13 @@ extend_face_to_end_of_line (it)
16909 it->object = make_number (0); 16909 it->object = make_number (0);
16910 it->c = ' '; 16910 it->c = ' ';
16911 it->len = 1; 16911 it->len = 1;
16912 it->face_id = face->id; 16912 /* The last row's blank glyphs should get the default face, to
16913 avoid painting the rest of the window with the region face,
16914 if the region ends at ZV. */
16915 if (it->glyph_row->ends_at_zv_p)
16916 it->face_id = DEFAULT_FACE_ID;
16917 else
16918 it->face_id = face->id;
16913 16919
16914 PRODUCE_GLYPHS (it); 16920 PRODUCE_GLYPHS (it);
16915 16921
@@ -17810,7 +17816,7 @@ display_line (it)
17810 *it = save_it; 17816 *it = save_it;
17811 } 17817 }
17812 else if (!row->continued_p 17818 else if (!row->continued_p
17813 && row->continuation_lines_width 17819 && MATRIX_ROW_CONTINUATION_LINE_P (row)
17814 && it->eol_pos.charpos > 0) 17820 && it->eol_pos.charpos > 0)
17815 { 17821 {
17816 /* Last row of a continued line. Use the position 17822 /* Last row of a continued line. Use the position