Don't delete snippets more than once.

* yasnippet.el (yas--on-field-overlay-modification): Don't commit
snippet again if the the triggering overlay has already been deleted.
This commit is contained in:
Noam Postavsky 2017-05-16 21:40:06 -04:00
parent 1bf7a4cbae
commit 82818e5460

View File

@ -3580,6 +3580,11 @@ field start. This hook does nothing if an undo is in progress."
(unless (or (not after?)
yas--inhibit-overlay-hooks
(not (overlayp yas--active-field-overlay)) ; Avoid Emacs bug #21824.
;; If a single change hits multiple overlays of the same
;; snippet, then we delete the snippet the first time,
;; and then subsequent calls get a deleted overlay.
;; Don't delete the snippet again!
(not (overlay-buffer overlay))
(yas--undo-in-progress))
(let* ((inhibit-modification-hooks nil)
(yas--inhibit-overlay-hooks t)