aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-01-01 06:49:38 -0500
committerEli Zaretskii2010-01-01 06:49:38 -0500
commit93ba079d4e180e94145297f1959f31115ec3a92c (patch)
treefe0c4f1ba18607d2e99cd5debc1d23da30e29f7c /src
parent29e3d8d1cb8920b16e70b2a19ddd8e597969b10b (diff)
downloademacs-93ba079d4e180e94145297f1959f31115ec3a92c.tar.gz
emacs-93ba079d4e180e94145297f1959f31115ec3a92c.zip
Retrospective commit from 2009-10-31.
Continue debugging set_cursor_from_row. Continue debugging display of R2L glyph rows. xdisp.c (display_line): Always extend reversed_p rows to the end of line. (set_cursor_from_row): In R2L rows that don't display text, put the cursor on the rightmost glyph.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.bidi7
-rw-r--r--src/xdisp.c19
2 files changed, 23 insertions, 3 deletions
diff --git a/src/ChangeLog.bidi b/src/ChangeLog.bidi
index d4146e4c2e6..0df409481a7 100644
--- a/src/ChangeLog.bidi
+++ b/src/ChangeLog.bidi
@@ -1,3 +1,10 @@
12009-10-31 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (display_line): Always extend reversed_p rows to the end
4 of line.
5 (set_cursor_from_row): In R2L rows that don't display text, put
6 the cursor on the rightmost glyph.
7
12009-10-24 Eli Zaretskii <eliz@gnu.org> 82009-10-24 Eli Zaretskii <eliz@gnu.org>
2 9
3 * xdisp.c (set_cursor_from_row): Fix off-by-one error when 10 * xdisp.c (set_cursor_from_row): Fix off-by-one error when
diff --git a/src/xdisp.c b/src/xdisp.c
index b44ce759870..6b2e046b82b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6575,8 +6575,6 @@ next_element_from_buffer (it)
6575 be reversed. */ 6575 be reversed. */
6576 if (it->glyph_row && (it->bidi_it.level_stack[0].level & 1) != 0) 6576 if (it->glyph_row && (it->bidi_it.level_stack[0].level & 1) != 0)
6577 it->glyph_row->reversed_p = 1; 6577 it->glyph_row->reversed_p = 1;
6578 if (it->glyph_row && (it->bidi_it.level_stack[0].level & 1) != 0)
6579 it->glyph_row->reversed_p = 1;
6580 bidi_get_next_char_visually (&it->bidi_it); 6578 bidi_get_next_char_visually (&it->bidi_it);
6581 } 6579 }
6582 else 6580 else
@@ -12527,6 +12525,14 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
12527 glyph_after = end; 12525 glyph_after = end;
12528 } 12526 }
12529 } 12527 }
12528 else if (row->reversed_p)
12529 {
12530 /* In R2L rows that don't display text, put the cursor on the
12531 rightmost glyph. Case in point: an empty last line that is
12532 part of an R2L paragraph. */
12533 cursor = end - 1;
12534 x = -1; /* will be computed below, at lable compute_x */
12535 }
12530 12536
12531 /* Step 1: Try to find the glyph whose character position 12537 /* Step 1: Try to find the glyph whose character position
12532 corresponds to point. If that's not possible, find 2 glyphs 12538 corresponds to point. If that's not possible, find 2 glyphs
@@ -12701,6 +12707,9 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
12701 cprop = Fget_char_property (make_number (gpos), 12707 cprop = Fget_char_property (make_number (gpos),
12702 Qcursor, 12708 Qcursor,
12703 glyph->object); 12709 glyph->object);
12710 /* FIXME: This loses the feature of the
12711 unidirectional redisplay when the
12712 property value was an integer. */
12704 if (!NILP (cprop)) 12713 if (!NILP (cprop))
12705 { 12714 {
12706 cursor = glyph; 12715 cursor = glyph;
@@ -16529,7 +16538,6 @@ extend_face_to_end_of_line (it)
16529 Lisp_Object saved_object; 16538 Lisp_Object saved_object;
16530 enum display_element_type saved_what = it->what; 16539 enum display_element_type saved_what = it->what;
16531 int saved_face_id = it->face_id; 16540 int saved_face_id = it->face_id;
16532 int text_len = it->glyph_row->used[TEXT_AREA];
16533 16541
16534 saved_object = it->object; 16542 saved_object = it->object;
16535 saved_pos = it->position; 16543 saved_pos = it->position;
@@ -16905,6 +16913,11 @@ display_line (it)
16905 16913
16906 it->continuation_lines_width = 0; 16914 it->continuation_lines_width = 0;
16907 row->ends_at_zv_p = 1; 16915 row->ends_at_zv_p = 1;
16916 /* A row that displays right-to-left text must always have
16917 its last face extended all the way to the end of line,
16918 even if this row ends in ZV. */
16919 if (row->reversed_p)
16920 extend_face_to_end_of_line (it);
16908 row_end = it->current; 16921 row_end = it->current;
16909 break; 16922 break;
16910 } 16923 }