Preserve cursor position for scratch buffer

Not across restarts, but across toggles of the scratch popup.
This commit is contained in:
Henrik Lissner 2020-02-25 18:11:13 -05:00
parent 505ca8712d
commit da3e24e686
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -35,9 +35,11 @@ following:
doom-scratch-dir)))
(make-directory doom-scratch-dir t)
(when (file-readable-p scratch-file)
(let ((pt (point)))
(erase-buffer)
(insert-file-contents scratch-file)
(set-auto-mode)
(goto-char pt))
t)))
;;;###autoload