From 15fa4783a39e7a8d99cc6b5e783307c08b25a823 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 7 Jul 2011 16:11:54 +0900 Subject: [PATCH] Ignore a static composition that starts before the current checking position in redisplay. --- src/ChangeLog | 7 +++++++ src/composite.c | 1 + src/xdisp.c | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 46fef8b9285..7193374972b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-07-07 Kenichi Handa + + * composite.c (composition_compute_stop_pos): Ignore a static + composition starting before CHARPOS (Bug#8915). + + * xdisp.c (handle_composition_prop): Likewise. + 2011-06-18 YAMAMOTO Mitsuharu * dispnew.c (scrolling_window): Before scrolling, turn off a diff --git a/src/composite.c b/src/composite.c index ec2595813aa..0ad0af90d07 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1042,6 +1042,7 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) cmp_it->id = -1; cmp_it->ch = -2; if (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 1f42e427428..b8a8ea7484d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4641,6 +4641,11 @@ handle_composition_prop (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)) -- 2.11.4.GIT