comparison src/xdisp.c @ 108089:2bdfb77de643

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.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 23 Apr 2010 21:23:51 +0300
parents 33a95d8ffa43 d9c182b86800
children 01ca94871a56
comparison
equal deleted inserted replaced
108087:076e73b014a5 108089:2bdfb77de643
6272 reseat_at_next_visible_line_start (it, 0); 6272 reseat_at_next_visible_line_start (it, 0);
6273 else if (it->cmp_it.id >= 0) 6273 else if (it->cmp_it.id >= 0)
6274 { 6274 {
6275 IT_CHARPOS (*it) += it->cmp_it.nchars; 6275 IT_CHARPOS (*it) += it->cmp_it.nchars;
6276 IT_BYTEPOS (*it) += it->cmp_it.nbytes; 6276 IT_BYTEPOS (*it) += it->cmp_it.nbytes;
6277 if (it->bidi_p)
6278 {
6279 if (it->bidi_it.new_paragraph)
6280 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
6281 /* Resync the bidi iterator with IT's new position.
6282 FIXME: this doesn't support bidirectional text. */
6283 while (it->bidi_it.charpos < IT_CHARPOS (*it))
6284 bidi_get_next_char_visually (&it->bidi_it);
6285 }
6277 if (it->cmp_it.to < it->cmp_it.nglyphs) 6286 if (it->cmp_it.to < it->cmp_it.nglyphs)
6278 it->cmp_it.from = it->cmp_it.to; 6287 it->cmp_it.from = it->cmp_it.to;
6279 else 6288 else
6280 { 6289 {
6281 it->cmp_it.id = -1; 6290 it->cmp_it.id = -1;
6993 { 7002 {
6994 if (it->c < 0) 7003 if (it->c < 0)
6995 { 7004 {
6996 IT_CHARPOS (*it) += it->cmp_it.nchars; 7005 IT_CHARPOS (*it) += it->cmp_it.nchars;
6997 IT_BYTEPOS (*it) += it->cmp_it.nbytes; 7006 IT_BYTEPOS (*it) += it->cmp_it.nbytes;
7007 if (it->bidi_p)
7008 {
7009 if (it->bidi_it.new_paragraph)
7010 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
7011 /* Resync the bidi iterator with IT's new position.
7012 FIXME: this doesn't support bidirectional text. */
7013 while (it->bidi_it.charpos < IT_CHARPOS (*it))
7014 bidi_get_next_char_visually (&it->bidi_it);
7015 }
6998 return 0; 7016 return 0;
6999 } 7017 }
7000 it->position = it->current.pos; 7018 it->position = it->current.pos;
7001 it->object = it->w->buffer; 7019 it->object = it->w->buffer;
7002 it->c = composition_update_it (&it->cmp_it, IT_CHARPOS (*it), 7020 it->c = composition_update_it (&it->cmp_it, IT_CHARPOS (*it),