]> code.delx.au - gnu-emacs/blobdiff - src/composite.c
src/ChangeLog: Fix format.
[gnu-emacs] / src / composite.c
index 577640f6fb74f746cec60e290dbbbf58dfcc0b75..d402d5ad0c4b14609b1862749df58d8cce38b04d 100644 (file)
@@ -967,7 +967,6 @@ autocmp_chars (Lisp_Object rule, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT
 }
 
 static Lisp_Object _work_val;
-static int _work_char;
 
 /* 1 iff the character C is composable.  Characters of general
    category Z? or C? are not composable except for ZWNJ and ZWJ. */
@@ -1026,6 +1025,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;