]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix #607; avoid Emacs bug #21824
authorNoam Postavsky <npostavs@users.sourceforge.net>
Wed, 4 Nov 2015 03:16:17 +0000 (22:16 -0500)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Wed, 4 Nov 2015 03:16:17 +0000 (22:16 -0500)
See also
- https://github.com/capitaomorte/yasnippet/issues/607
- http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21824

* yasnippet.el (yas--on-field-overlay-modification): Do nothing if
  yas--active-field-overlay is not an overlay.

yasnippet.el

index 4f06a48e5d6230c1a0b66f6ceb135fa663e73027..adfe88ae48f79d9f8df21fee103836557821d72e 100644 (file)
@@ -3402,6 +3402,7 @@ Only clears the field if it hasn't been modified and it point it
 at field start.  This hook doesn't do anything if an undo is in
 progress."
   (unless (or yas--inhibit-overlay-hooks
+              (not (overlayp yas--active-field-overlay)) ; Avoid Emacs bug #21824.
               (yas--undo-in-progress))
     (let* ((field (overlay-get overlay 'yas--field))
            (snippet (overlay-get yas--active-field-overlay 'yas--snippet)))