mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
fix the bug on expanding a snippet without
This commit is contained in:
parent
331812fefb
commit
d93bea8204
10
yasnippet.el
10
yasnippet.el
@ -803,10 +803,12 @@ will be deleted before inserting template."
|
||||
|
||||
;; Step 16: Do necessary indenting
|
||||
(save-excursion
|
||||
(goto-char (overlay-start (yas/snippet-overlay snippet)))
|
||||
(while (re-search-forward "$>" nil t)
|
||||
(replace-match "")
|
||||
(indent-according-to-mode)))))))
|
||||
(let ((ovst (overlay-start (yas/snippet-overlay snippet))))
|
||||
(when ovst
|
||||
(goto-char ovst)
|
||||
(while (re-search-forward "$>" nil t)
|
||||
(replace-match "")
|
||||
(indent-according-to-mode)))))))))
|
||||
|
||||
(defun yas/current-snippet-overlay (&optional point)
|
||||
"Get the most proper overlay which is belongs to a snippet."
|
||||
|
Loading…
x
Reference in New Issue
Block a user