From: Eli Zaretskii Date: Sat, 23 Jul 2011 14:34:51 +0000 (+0300) Subject: src/bidi.c: Backport from trunk a bugfix for bidi_paragraph_init at EOB. X-Git-Tag: emacs-pretest-24.0.90~104^2~163^2^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8719d1dcad924e8b00b8610cbb531fcef5fca0b5;p=emacs.git src/bidi.c: Backport from trunk a bugfix for bidi_paragraph_init at EOB. --- diff --git a/src/bidi.c b/src/bidi.c index 3bee2009a0e..77043d9236f 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1134,10 +1134,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) || type == LRE || type == LRO)); type = bidi_get_type (ch, NEUTRAL_DIR)) { - if (!string_p - && type == NEUTRAL_B - && bidi_at_paragraph_end (pos, bytepos) >= -1) - break; if (pos >= end) { /* Pretend there's a paragraph separator at end of @@ -1145,6 +1141,10 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p) type = NEUTRAL_B; break; } + if (!string_p + && type == NEUTRAL_B + && bidi_at_paragraph_end (pos, bytepos) >= -1) + break; /* Fetch next character and advance to get past it. */ ch = bidi_fetch_char (bytepos, pos, &disp_pos, &bidi_it->string, bidi_it->frame_window_p, &ch_len, &nchars);