mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
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:
parent
1bf7a4cbae
commit
82818e5460
@ -3580,6 +3580,11 @@ field start. This hook does nothing if an undo is in progress."
|
|||||||
(unless (or (not after?)
|
(unless (or (not after?)
|
||||||
yas--inhibit-overlay-hooks
|
yas--inhibit-overlay-hooks
|
||||||
(not (overlayp yas--active-field-overlay)) ; Avoid Emacs bug #21824.
|
(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))
|
(yas--undo-in-progress))
|
||||||
(let* ((inhibit-modification-hooks nil)
|
(let* ((inhibit-modification-hooks nil)
|
||||||
(yas--inhibit-overlay-hooks t)
|
(yas--inhibit-overlay-hooks t)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user