Preserve cursor position for scratch buffer
Not across restarts, but across toggles of the scratch popup.
This commit is contained in:
parent
505ca8712d
commit
da3e24e686
1 changed files with 5 additions and 3 deletions
|
@ -35,9 +35,11 @@ following:
|
|||
doom-scratch-dir)))
|
||||
(make-directory doom-scratch-dir t)
|
||||
(when (file-readable-p scratch-file)
|
||||
(erase-buffer)
|
||||
(insert-file-contents scratch-file)
|
||||
(set-auto-mode)
|
||||
(let ((pt (point)))
|
||||
(erase-buffer)
|
||||
(insert-file-contents scratch-file)
|
||||
(set-auto-mode)
|
||||
(goto-char pt))
|
||||
t)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue