diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/composite.c | 1 | ||||
-rw-r--r-- | src/xdisp.c | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6485ed08027..9186061530e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-07-07 Kenichi Handa <handa@m17n.org> + + * composite.c (composition_compute_stop_pos): Ignore a static + composition starting before CHARPOS (Bug#8915). + + * xdisp.c (handle_composition_prop): Likewise. + 2011-07-07 Eli Zaretskii <eliz@gnu.org> * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what. diff --git a/src/composite.c b/src/composite.c index 577640f6fb7..cf1e053f027 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1026,6 +1026,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, /* FIXME: Bidi is not yet handled well in static composition. */ if (charpos < endpos && find_composition (charpos, endpos, &start, &end, &prop, string) + && start >= charpos && COMPOSITION_VALID_P (start, end, prop)) { cmp_it->stop_pos = endpos = start; diff --git a/src/xdisp.c b/src/xdisp.c index a99f06a4e45..774bc22699a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4583,6 +4583,11 @@ handle_composition_prop (struct it *it) && COMPOSITION_VALID_P (start, end, prop) && (STRINGP (it->string) || (PT <= start || PT >= end))) { + if (start < pos) + /* As we can't handle this situation (perhaps font-lock added + a new composition), we just return here hoping that next + redisplay will detect this composition much earlier. */ + return HANDLED_NORMALLY; if (start != pos) { if (STRINGP (it->string)) |