protect-visible-buffers: get-buffer-window-list => get-buffer-window
The "current" window is forgotten by the time doom|protect-visible-buffers runs, so use get-buffer-window (native C function) to detect if another window housing this buffer exists.
This commit is contained in:
parent
5bd361cbc4
commit
5c54f58ff8
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ local value, whether or not it's permanent-local. Therefore, we cycle
|
||||||
(defun doom|protect-visible-buffers ()
|
(defun doom|protect-visible-buffers ()
|
||||||
"Don't kill the current buffer if it is visible in another window (bury it
|
"Don't kill the current buffer if it is visible in another window (bury it
|
||||||
instead)."
|
instead)."
|
||||||
(not (and after-init-time (get-buffer-window-list nil t))))
|
(not (and after-init-time (get-buffer-window nil t))))
|
||||||
(add-hook 'kill-buffer-query-functions #'doom|protect-visible-buffers)
|
(add-hook 'kill-buffer-query-functions #'doom|protect-visible-buffers)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue