Skip to content

Commit 9a06b97

Browse files
committed
Closes 536: Fix navigation to zero-length fields at snippet end
* yasnippet.el (yas--field-probably-deleted-p): A deleted field was probably modified before, so enforce that condition.
1 parent 51d4ed1 commit 9a06b97

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

yasnippet.el

+6-4
Original file line numberDiff line numberDiff line change
@@ -3032,12 +3032,14 @@ through the field's start point"
30323032
;; field must be zero length
30333033
;;
30343034
(zerop (- (yas--field-start field) (yas--field-end field)))
3035-
;; skip if:
3035+
;; field must have been modified
3036+
;;
3037+
(yas--field-modified-p field)
3038+
;; either:
30363039
(or
3037-
;; 1) is a nested field and it's been modified
3040+
;; 1) it's a nested field
30383041
;;
3039-
(and (yas--field-parent-field field)
3040-
(yas--field-modified-p field))
3042+
(yas--field-parent-field field)
30413043
;; 2) ends just before the snippet end
30423044
;;
30433045
(and (eq field (car (last (yas--snippet-fields snippet))))

0 commit comments

Comments
 (0)