mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Preserve cursor position for scratch buffer
Not across restarts, but across toggles of the scratch popup.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user