src/bidi.c: Backport from trunk a bugfix for bidi_paragraph_init at EOB.

This commit is contained in:
Eli Zaretskii 2011-07-23 17:34:51 +03:00
parent c1734fbd6f
commit 8719d1dcad

View file

@ -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);