mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
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.
This commit is contained in:
parent
51d4ed14df
commit
1c97671c6e
10
yasnippet.el
10
yasnippet.el
@ -3032,12 +3032,14 @@ through the field's start point"
|
|||||||
;; field must be zero length
|
;; field must be zero length
|
||||||
;;
|
;;
|
||||||
(zerop (- (yas--field-start field) (yas--field-end field)))
|
(zerop (- (yas--field-start field) (yas--field-end field)))
|
||||||
;; skip if:
|
;; field must have been modified
|
||||||
|
;;
|
||||||
|
(yas--field-modified-p field)
|
||||||
|
;; either:
|
||||||
(or
|
(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-parent-field field)
|
||||||
(yas--field-modified-p field))
|
|
||||||
;; 2) ends just before the snippet end
|
;; 2) ends just before the snippet end
|
||||||
;;
|
;;
|
||||||
(and (eq field (car (last (yas--snippet-fields snippet))))
|
(and (eq field (car (last (yas--snippet-fields snippet))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user