]> git.eshelyaron.com Git - emacs.git/commitdiff
(find_composition): Fix a code for searching a composition backward.
authorKenichi Handa <handa@m17n.org>
Sat, 30 Dec 2000 02:29:22 +0000 (02:29 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 30 Dec 2000 02:29:22 +0000 (02:29 +0000)
src/ChangeLog
src/composite.c

index 3facf78719adc71010d67285066131c1618d096a..7299bc4e399f317c012e09ad24ad97bf8aea1a4f 100644 (file)
@@ -1,7 +1,7 @@
 2000-12-30  Kenichi Handa  <handa@etl.go.jp>
 
-       * composite.c (find_composition): Fix a code for searching a
-       composition backward.
+       * composite.c (find_composition): Fix a code for searching
+       backward.
 
 2000-12-29  Gerd Moellmann  <gerd@gnu.org>
 
index 2ffc33d651eeb68c5fbc3c679a0fc29d09d3cbe7..83d5b0d6f25afc5dbc40971653f37429d6f1cec5 100644 (file)
@@ -422,14 +422,25 @@ find_composition (pos, limit, start, end, prop, object)
     return 0;
 
   if (limit > pos)             /* search forward */
-    val = Fnext_single_property_change (make_number (pos), Qcomposition,
-                                       object, make_number (limit));
+    {
+      val = Fnext_single_property_change (make_number (pos), Qcomposition,
+                                         object, make_number (limit));
+      pos = XINT (val);
+      if (pos == limit)
+       return 0;
+    }
   else                         /* search backward */
-    val = Fprevious_single_property_change (make_number (pos), Qcomposition,
-                                           object, make_number (limit));
-  pos = XINT (val);
-  if (pos == limit)
-    return 0;
+    {
+      if (get_property_and_range (pos - 1, Qcomposition, prop, start, end,
+                                 object))
+       return 1;
+      val = Fprevious_single_property_change (make_number (pos), Qcomposition,
+                                             object, make_number (limit));
+      pos = XINT (val);
+      if (pos == limit)
+       return 0;
+      pos--;
+    }
   get_property_and_range (pos, Qcomposition, prop, start, end, object);
   return 1;
 }