changeset 98115:463a86221cdd

(composition_compute_stop_pos): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Wed, 10 Sep 2008 01:36:19 +0000
parents a5e4178becee
children 10a380ea8509
files src/composite.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/composite.c	Wed Sep 10 01:28:52 2008 +0000
+++ b/src/composite.c	Wed Sep 10 01:36:19 2008 +0000
@@ -1000,6 +1000,7 @@
   if (endpos > charpos + MAX_NEWLINE_DISTANCE)
     endpos = charpos + MAX_NEWLINE_DISTANCE;
   cmp_it->stop_pos = endpos;
+  cmp_it->ch = -2;
   if (find_composition (charpos, endpos, &start, &end, &prop, string)
       && COMPOSITION_VALID_P (start, end, prop))
     {
@@ -1043,15 +1044,12 @@
 	      cmp_it->lookback = XFASTINT (AREF (elt, 1));
 	      cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
 	      cmp_it->ch = c;
-	      break;
+	      return;
 	    }
 	}
     }
-  if (charpos == endpos)
-    {
-      cmp_it->stop_pos = endpos;
-      cmp_it->ch = -2;
-    }
+  cmp_it->stop_pos = charpos;
+  cmp_it->ch = -2;
 }
 
 /* Check if the character at CHARPOS (and BYTEPOS) is composed