mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-06 15:13:33 -05:00
Don't exclude last character on visual yas-insert-snippet
This commit is contained in:
@@ -23,6 +23,12 @@ normal mode if there are no fields."
|
|||||||
"Switch to insert mode when expanding a template via backtab, or go back to
|
"Switch to insert mode when expanding a template via backtab, or go back to
|
||||||
normal mode if there are no fields."
|
normal mode if there are no fields."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(when (evil-visual-state-p)
|
||||||
|
(let ((end (region-end)))
|
||||||
|
(evil-visual-select
|
||||||
|
(region-beginning)
|
||||||
|
(if (eq evil-this-type 'line) end (1+ end))
|
||||||
|
'inclusive)))
|
||||||
(yas-insert-snippet)
|
(yas-insert-snippet)
|
||||||
(let* ((snippet (first (yas--snippets-at-point)))
|
(let* ((snippet (first (yas--snippets-at-point)))
|
||||||
(fields (yas--snippet-fields snippet)))
|
(fields (yas--snippet-fields snippet)))
|
||||||
|
Reference in New Issue
Block a user