mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-25 14:13:37 -05:00
Update scratch buffer PWD on kill-buffer
This commit is contained in:
@@ -163,13 +163,16 @@ left, create a scratch buffer."
|
|||||||
(continue t))
|
(continue t))
|
||||||
(if (or (= realc 0)
|
(if (or (= realc 0)
|
||||||
(and (= realc 1) (eq (car real-buffers) (current-buffer))))
|
(and (= realc 1) (eq (car real-buffers) (current-buffer))))
|
||||||
(progn (switch-to-buffer "*scratch*")
|
(progn
|
||||||
|
(narf|update-scratch-buffer-cwd)
|
||||||
|
(switch-to-buffer "*scratch*")
|
||||||
(message "Nowhere to go"))
|
(message "Nowhere to go"))
|
||||||
(funcall move-func)
|
(funcall move-func)
|
||||||
(while (and continue (< i max))
|
(while (and continue (< i max))
|
||||||
(let ((current-buffer (current-buffer)))
|
(let ((current-buffer (current-buffer)))
|
||||||
(cond ((eq current-buffer start-buffer)
|
(cond ((eq current-buffer start-buffer)
|
||||||
(if scratch-default
|
(when scratch-default
|
||||||
|
(narf|update-scratch-buffer-cwd)
|
||||||
(switch-to-buffer "*scratch*"))
|
(switch-to-buffer "*scratch*"))
|
||||||
(setq continue nil))
|
(setq continue nil))
|
||||||
((not (memq current-buffer real-buffers))
|
((not (memq current-buffer real-buffers))
|
||||||
|
Reference in New Issue
Block a user