emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 82818e5 48/63: Don't delete snippets more than once.


From: Noam Postavsky
Subject: [elpa] master 82818e5 48/63: Don't delete snippets more than once.
Date: Mon, 17 Jul 2017 22:54:18 -0400 (EDT)

branch: master
commit 82818e54605fdb19f95c7e706958db32bd525e1d
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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.
---
 yasnippet.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/yasnippet.el b/yasnippet.el
index fbdb461..77e9fc7 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]