Fix wrong-type-argument error opening new files
Caused when either your snippets library is empty or a file-template doesn't exist when expanded.
This commit is contained in:
parent
5bb40e6dd1
commit
486d4a12e7
1 changed files with 4 additions and 4 deletions
|
@ -79,10 +79,10 @@ evil is loaded and enabled)."
|
|||
(unless yas-minor-mode
|
||||
(yas-minor-mode-on))
|
||||
(when (and yas-minor-mode
|
||||
(yas-expand-snippet
|
||||
(yas--template-content
|
||||
(cl-find trigger (yas--all-templates (yas--get-snippet-tables mode))
|
||||
:key #'yas--template-key :test #'equal)))
|
||||
(when-let*
|
||||
((template (cl-find trigger (yas--all-templates (yas--get-snippet-tables mode))
|
||||
:key #'yas--template-key :test #'equal)))
|
||||
(yas-expand-snippet (yas--template-content template)))
|
||||
(and (featurep 'evil) evil-mode)
|
||||
(and yas--active-field-overlay
|
||||
(overlay-buffer yas--active-field-overlay)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue