]> git.eshelyaron.com Git - emacs.git/commitdiff
Ignore a static composition that starts before the current checking position in redis...
authorKenichi Handa <handa@m17n.org>
Thu, 7 Jul 2011 07:11:54 +0000 (16:11 +0900)
committerKenichi Handa <handa@m17n.org>
Thu, 7 Jul 2011 07:11:54 +0000 (16:11 +0900)
src/ChangeLog
src/composite.c
src/xdisp.c

index 46fef8b928549e574d69ca26fb31f89c856e1fd2..7193374972b4c0e1498a3d21e491511a1db19e14 100644 (file)
@@ -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-06-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * dispnew.c (scrolling_window): Before scrolling, turn off a
index ec2595813aab059ec4e912249fb8da26fd721ca1..0ad0af90d07313c044e25a4fc0c78082654bbd96 100644 (file)
@@ -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;
index 1f42e427428911b2c38a1bc8a2563c26bf220bb5..b8a8ea7484dc370dbac2cb7bb2c2740967a75cb4 100644 (file)
@@ -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))