aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.bidi8
-rw-r--r--src/bidi.c12
2 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog.bidi b/src/ChangeLog.bidi
index 0df409481a7..a09ce293823 100644
--- a/src/ChangeLog.bidi
+++ b/src/ChangeLog.bidi
@@ -1,3 +1,11 @@
12009-11-07 Eli Zaretskii <eliz@gnu.org>
2
3 * bidi.c (bidi_paragraph_init): Don't overstep end of buffer.
4 Treat end of buffer as a NEUTRAL_B character.
5 (bidi_resolve_explicit): Don't special-case ZV when bidi_it->type
6 is NEUTRAL_B, since bidi_set_paragraph_end no longer sets the
7 new_paragraph flag.
8
12009-10-31 Eli Zaretskii <eliz@gnu.org> 92009-10-31 Eli Zaretskii <eliz@gnu.org>
2 10
3 * xdisp.c (display_line): Always extend reversed_p rows to the end 11 * xdisp.c (display_line): Always extend reversed_p rows to the end
diff --git a/src/bidi.c b/src/bidi.c
index 4b239caa6f8..e8b7b2a8c56 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -927,6 +927,12 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it)
927 { 927 {
928 if (type == NEUTRAL_B && bidi_at_paragraph_end (pos, bytepos) >= -1) 928 if (type == NEUTRAL_B && bidi_at_paragraph_end (pos, bytepos) >= -1)
929 break; 929 break;
930 if (bytepos >= ZV_BYTE)
931 {
932 /* Pretend there's a paragraph separator at end of buffer. */
933 type = NEUTRAL_B;
934 break;
935 }
930 FETCH_CHAR_ADVANCE (ch, pos, bytepos); 936 FETCH_CHAR_ADVANCE (ch, pos, bytepos);
931 } 937 }
932 if (type == STRONG_R || type == STRONG_AL) /* P3 */ 938 if (type == STRONG_R || type == STRONG_AL) /* P3 */
@@ -1289,11 +1295,7 @@ bidi_resolve_explicit (struct bidi_it *bidi_it)
1289 1295
1290 if (bidi_it->type == NEUTRAL_B) /* X8 */ 1296 if (bidi_it->type == NEUTRAL_B) /* X8 */
1291 { 1297 {
1292 /* End of buffer does _not_ indicate a new paragraph is coming. 1298 bidi_set_paragraph_end (bidi_it);
1293 Otherwise, each character inserted at EOB will be processed
1294 as starting a new paragraph. */
1295 if (bidi_it->bytepos < ZV_BYTE)
1296 bidi_set_paragraph_end (bidi_it);
1297 /* This is needed by bidi_resolve_weak below, and in L1. */ 1299 /* This is needed by bidi_resolve_weak below, and in L1. */
1298 bidi_it->type_after_w1 = bidi_it->type; 1300 bidi_it->type_after_w1 = bidi_it->type;
1299 bidi_check_type (bidi_it->type_after_w1); 1301 bidi_check_type (bidi_it->type_after_w1);