branch: externals/tempel
commit 07d16fded703be30f8cab3f5dee8ec85d905ad4b
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Update fields when new field is inserted
---
tempel.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tempel.el b/tempel.el
index 205ab35562..dbb5733dfe 100644
--- a/tempel.el
+++ b/tempel.el
@@ -235,7 +235,8 @@ INIT is the optional initial input."
(when (and init (get-text-property 0 'tempel--default init))
(overlay-put ov 'face 'tempel-default)
(overlay-put ov 'tempel--default
- (if (string-match-p ": \\'" init) 'end 'start)))))
+ (if (string-match-p ": \\'" init) 'end 'start)))
+ (template--synchronize-fields st ov)))
(defun tempel--form (st form)
"Add new template field evaluating FORM to ST."