* yasnippet-debug.el (yas-debug-snippet): Handle non-numbered fields.

This commit is contained in:
Noam Postavsky 2017-09-23 18:32:57 -04:00
parent 89eb7ab64d
commit ba4e5c1736

View File

@ -177,7 +177,7 @@
(when-let (active-field (yas--snippet-active-field snippet))
(unless (consp (yas--field-start active-field))
(printf "\tactive field: #%d %s %s covering \"%s\"\n"
(yas--field-number active-field)
(or (yas--field-number active-field) -1)
(if (yas--field-modified-p active-field) "**" "--")
(yas-debug-live-range active-field)
(buffer-substring-no-properties (yas--field-start active-field) (yas--field-end active-field)))))
@ -188,7 +188,7 @@
(dolist (field (yas--snippet-fields snippet))
(unless (consp (yas--field-start field))
(printf "\tfield: %d %s %s covering \"%s\" next: %s%s\n"
(yas--field-number field)
(or (yas--field-number field) -1)
(if (yas--field-modified-p field) "**" "--")
(yas-debug-live-range field)
(buffer-substring-no-properties (yas--field-start field) (yas--field-end field))