Commit 728588cc authored by Eli Zaretskii's avatar Eli Zaretskii

Fix display of composed characters from L2R scripts in bidi buffers. (Bug#5977)

 xdisp.c (set_iterator_to_next, next_element_from_composition):
 After advancing IT past the composition, resync the bidi iterator
 with IT's position.
parents 98092630 b893a150
2010-04-23 Eli Zaretskii <eliz@gnu.org>
Fix display of composed characters from L2R scripts in bidi buffers.
* xdisp.c (set_iterator_to_next, next_element_from_composition):
After advancing IT past the composition, resync the bidi iterator
with IT's position. (Bug#5977)
2010-04-23 Dan Nicolaescu <dann@ics.uci.edu>
* Makefile.in (LD_SWITCH_MACHINE_TEMACS): Remove, unused.
......
......@@ -6274,6 +6274,15 @@ set_iterator_to_next (it, reseat_p)
{
IT_CHARPOS (*it) += it->cmp_it.nchars;
IT_BYTEPOS (*it) += it->cmp_it.nbytes;
if (it->bidi_p)
{
if (it->bidi_it.new_paragraph)
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
/* Resync the bidi iterator with IT's new position.
FIXME: this doesn't support bidirectional text. */
while (it->bidi_it.charpos < IT_CHARPOS (*it))
bidi_get_next_char_visually (&it->bidi_it);
}
if (it->cmp_it.to < it->cmp_it.nglyphs)
it->cmp_it.from = it->cmp_it.to;
else
......@@ -6995,6 +7004,15 @@ next_element_from_composition (it)
{
IT_CHARPOS (*it) += it->cmp_it.nchars;
IT_BYTEPOS (*it) += it->cmp_it.nbytes;
if (it->bidi_p)
{
if (it->bidi_it.new_paragraph)
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
/* Resync the bidi iterator with IT's new position.
FIXME: this doesn't support bidirectional text. */
while (it->bidi_it.charpos < IT_CHARPOS (*it))
bidi_get_next_char_visually (&it->bidi_it);
}
return 0;
}
it->position = it->current.pos;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment