Fixed the bug of empty overlay (Issue 48), thanks some.any.key

This commit is contained in:
Zhang Chiyuan 2008-12-25 15:16:11 +00:00
parent 6d9f7a5048
commit c8b94d14c5

View File

@ -649,6 +649,8 @@ for each field."
(length (- end start)))
(goto-char start)
(insert (yas/calculate-field-value field text))
(if (eq length 0)
(move-overlay overlay start (+ start (length text))))
(delete-char length))))
(defun yas/expand-snippet (start end template)