Skip to content

Commit

Permalink
Closes 536: Fix navigation to zero-length fields at snippet end
Browse files Browse the repository at this point in the history
* yasnippet.el (yas--field-probably-deleted-p): A deleted field
was probably modified before, so enforce that condition.
  • Loading branch information
joaotavora committed Nov 2, 2014
1 parent 51d4ed1 commit 9a06b97
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions yasnippet.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down

0 comments on commit 9a06b97

Please sign in to comment.