aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-09-29 11:52:43 +0200
committerEli Zaretskii2010-09-29 11:52:43 +0200
commitaf7ef32d8e12d07c4a37df1685d997ac76641dd7 (patch)
treebf85ad41853dea29413d8e5e132b6f22134c1da8 /src
parent9a2ba070268b71eabdba52481bc996b7183729b0 (diff)
downloademacs-af7ef32d8e12d07c4a37df1685d997ac76641dd7.tar.gz
emacs-af7ef32d8e12d07c4a37df1685d997ac76641dd7.zip
Fix bug #7128.
xdisp.c (reseat_1): Initialize bidi_it.paragraph_dir to NEUTRAL_DIR. (handle_invisible_prop, iterate_out_of_display_property) (next_element_from_buffer): If bidi_it.first_elt is set, call bidi_paragraph_init with NO_DEFAULT_P argument non-zero.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/xdisp.c13
2 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2443a4585b9..b14ed34b26d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
12010-09-29 Eli Zaretskii <eliz@gnu.org> 12010-09-29 Eli Zaretskii <eliz@gnu.org>
2 2
3 * xdisp.c (reseat_1): Initialize bidi_it.paragraph_dir to
4 NEUTRAL_DIR.
5 (handle_invisible_prop, iterate_out_of_display_property)
6 (next_element_from_buffer): If bidi_it.first_elt is set, call
7 bidi_paragraph_init with NO_DEFAULT_P argument non-zero.
8 (Bug#7128)
9
3 * print.c (print_object): Fix format string and argument types for 10 * print.c (print_object): Fix format string and argument types for
4 printing a Lisp_Misc_Marker. 11 printing a Lisp_Misc_Marker.
5 12
diff --git a/src/xdisp.c b/src/xdisp.c
index ada69da29ba..9b0f94ef657 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3831,7 +3831,7 @@ handle_invisible_prop (struct it *it)
3831 skip any text at the beginning, which resets the 3831 skip any text at the beginning, which resets the
3832 FIRST_ELT flag. */ 3832 FIRST_ELT flag. */
3833 bidi_paragraph_init (it->paragraph_embedding, 3833 bidi_paragraph_init (it->paragraph_embedding,
3834 &it->bidi_it, 0); 3834 &it->bidi_it, 1);
3835 } 3835 }
3836 do 3836 do
3837 { 3837 {
@@ -5152,7 +5152,7 @@ iterate_out_of_display_property (struct it *it)
5152 of a new paragraph, next_element_from_buffer may not have a 5152 of a new paragraph, next_element_from_buffer may not have a
5153 chance to do that. */ 5153 chance to do that. */
5154 if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV) 5154 if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
5155 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 0); 5155 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
5156 /* prev_stop can be zero, so check against BEGV as well. */ 5156 /* prev_stop can be zero, so check against BEGV as well. */
5157 while (it->bidi_it.charpos >= BEGV 5157 while (it->bidi_it.charpos >= BEGV
5158 && it->prev_stop <= it->bidi_it.charpos 5158 && it->prev_stop <= it->bidi_it.charpos
@@ -5584,7 +5584,10 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
5584 it->string_from_display_prop_p = 0; 5584 it->string_from_display_prop_p = 0;
5585 it->face_before_selective_p = 0; 5585 it->face_before_selective_p = 0;
5586 if (it->bidi_p) 5586 if (it->bidi_p)
5587 it->bidi_it.first_elt = 1; 5587 {
5588 it->bidi_it.first_elt = 1;
5589 it->bidi_it.paragraph_dir = NEUTRAL_DIR;
5590 }
5588 5591
5589 if (set_stop_p) 5592 if (set_stop_p)
5590 { 5593 {
@@ -6675,7 +6678,7 @@ next_element_from_buffer (struct it *it)
6675 { 6678 {
6676 /* If we are at the beginning of a line, we can produce the 6679 /* If we are at the beginning of a line, we can produce the
6677 next element right away. */ 6680 next element right away. */
6678 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 0); 6681 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
6679 bidi_move_to_visually_next (&it->bidi_it); 6682 bidi_move_to_visually_next (&it->bidi_it);
6680 } 6683 }
6681 else 6684 else
@@ -6689,7 +6692,7 @@ next_element_from_buffer (struct it *it)
6689 IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it)); 6692 IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it));
6690 it->bidi_it.charpos = IT_CHARPOS (*it); 6693 it->bidi_it.charpos = IT_CHARPOS (*it);
6691 it->bidi_it.bytepos = IT_BYTEPOS (*it); 6694 it->bidi_it.bytepos = IT_BYTEPOS (*it);
6692 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 0); 6695 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
6693 do 6696 do
6694 { 6697 {
6695 /* Now return to buffer position where we were asked to 6698 /* Now return to buffer position where we were asked to