]> git.eshelyaron.com Git - emacs.git/commitdiff
(handle_composition_prop): Push iterator on stack.
authorKim F. Storm <storm@cua.dk>
Fri, 23 Jun 2006 11:50:36 +0000 (11:50 +0000)
committerKim F. Storm <storm@cua.dk>
Fri, 23 Jun 2006 11:50:36 +0000 (11:50 +0000)
(set_iterator_to_next): Pop iterator at end of composition.

src/xdisp.c

index d70bc3d4238cfe7544e1895cae09f3bead6ed8ea..0c46545a2ac61f0d09ceb7cf3ceada5fe5e4952d 100644 (file)
@@ -4487,6 +4487,8 @@ handle_composition_prop (it)
                }
              return HANDLED_RECOMPUTE_PROPS;
            }
+
+         push_it (it);
          it->method = GET_FROM_COMPOSITION;
          it->cmp_id = id;
          it->cmp_len = COMPOSITION_LENGTH (prop);
@@ -5791,19 +5793,19 @@ set_iterator_to_next (it, reseat_p)
 
     case GET_FROM_COMPOSITION:
       xassert (it->cmp_id >= 0 && it->cmp_id < n_compositions);
-      if (STRINGP (it->string))
+      xassert (it->sp > 0);
+      pop_it (it);
+      if (it->method == GET_FROM_STRING)
        {
          IT_STRING_BYTEPOS (*it) += it->len;
          IT_STRING_CHARPOS (*it) += it->cmp_len;
-         it->method = GET_FROM_STRING;
          it->object = it->string;
          goto consider_string_end;
        }
-      else
+      else if (it->method == GET_FROM_BUFFER)
        {
          IT_BYTEPOS (*it) += it->len;
          IT_CHARPOS (*it) += it->cmp_len;
-         it->method = GET_FROM_BUFFER;
          it->object = it->w->buffer;
        }
       break;