From 5c54f58ff808e5e174915ddbe139bd2a3faf4ba2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Dec 2017 01:23:01 -0500 Subject: [PATCH] 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. --- core/core-ui.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 90342af68..87f84fed9 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -231,7 +231,7 @@ local value, whether or not it's permanent-local. Therefore, we cycle (defun doom|protect-visible-buffers () "Don't kill the current buffer if it is visible in another window (bury it 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)