]> code.delx.au - gnu-emacs-elpa/commitdiff
Closes #536: Fix navigation to zero-length fields at snippet end
authorJoão Távora <joaotavora@gmail.com>
Sun, 2 Nov 2014 23:53:11 +0000 (23:53 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sun, 2 Nov 2014 23:54:04 +0000 (23:54 +0000)
* yasnippet.el (yas--field-probably-deleted-p): A deleted field
was probably modified before, so enforce that condition.

yasnippet.el

index 1644a8574101469fec028d88fc5a30b74729a6f1..cb1d04123d603232a2c736c9d402bf09d9dfd1fa 100644 (file)
@@ -3032,12 +3032,14 @@ through the field's start point"
    ;; field must be zero length
    ;;
    (zerop (- (yas--field-start field) (yas--field-end field)))
-   ;; skip if:
+   ;; field must have been modified
+   ;;
+   (yas--field-modified-p field)
+   ;; either:
    (or
-    ;;  1) is a nested field and it's been modified
+    ;;  1) it's a nested field
     ;;
-    (and (yas--field-parent-field field)
-         (yas--field-modified-p field))
+    (yas--field-parent-field field)
     ;;  2) ends just before the snippet end
     ;;
     (and (eq field (car (last (yas--snippet-fields snippet))))