Respect yas-indent-line for mirror updates

* yasnippet.el (yas--mirror-update-display): Check yas-indent-line
before indenting.
This commit is contained in:
Noam Postavsky 2016-10-27 19:43:34 -04:00
parent 7b013dbbdb
commit 5534cab0b7

View File

@ -4303,10 +4303,11 @@ When multiple expressions are found, only the last one counts."
(yas--advance-start-maybe (yas--mirror-next mirror) (point)) (yas--advance-start-maybe (yas--mirror-next mirror) (point))
;; super-special advance ;; super-special advance
(yas--advance-end-of-parents-maybe mirror-parent-field (point))) (yas--advance-end-of-parents-maybe mirror-parent-field (point)))
(let ((yas--inhibit-overlay-hooks t)) (when (eq yas-indent-line 'auto)
(yas--indent-region (yas--mirror-start mirror) (let ((yas--inhibit-overlay-hooks t))
(yas--mirror-end mirror) (yas--indent-region (yas--mirror-start mirror)
snippet))))) (yas--mirror-end mirror)
snippet))))))
(defun yas--field-update-display (field) (defun yas--field-update-display (field)
"Much like `yas--mirror-update-display', but for fields." "Much like `yas--mirror-update-display', but for fields."