diff --git a/core/autoload/popups.el b/core/autoload/popups.el index b37acc281..344d95ad6 100644 --- a/core/autoload/popups.el +++ b/core/autoload/popups.el @@ -186,13 +186,6 @@ window parameter." ((or 'left 'right) (window-width window)) ((or 'above 'below) (window-height window)))) -(defun doom--popup-data (window) - (when-let (buffer (window-buffer window)) - `(,(buffer-name buffer) - :file ,(buffer-file-name buffer) - :rules ,(window-parameter window 'popup) - :size ,(doom-popup-size window)))) - ;;;###autoload (defmacro with-popup-rules! (rules &rest body) "TODO" @@ -218,3 +211,11 @@ window parameter." (cl-decf count)) (when (/= count 0) (other-window count))))) + +(defun doom--popup-data (window) + (unless (doom-popup-property :fixed window) + (when-let (buffer (window-buffer window)) + `(,(buffer-name buffer) + :file ,(buffer-file-name buffer) + :rules ,(window-parameter window 'popup) + :size ,(doom-popup-size window))))) diff --git a/core/core-popups.el b/core/core-popups.el index ecfe5ecad..c340795a6 100644 --- a/core/core-popups.el +++ b/core/core-popups.el @@ -35,7 +35,7 @@ "The shackle rule that caused this buffer to be recognized as a popup.") (defvar doom-popup-window-parameters - '(:noesc :modeline :autokill :autoclose) + '(:noesc :modeline :autokill :autoclose :fixed) "A list of window parameters that are set (and cleared) when `doom-popup-mode is enabled/disabled.'") @@ -63,7 +63,11 @@ recognized by DOOM's popup system. They are: that have an :autokill property. :autoclose If non-nil, close popup if ESC is pressed from outside - the popup window." + the popup window. + +:fixed If non-nil, don't treat this window like a popup. This makes it + impervious to being automatically closed or tracked in popup + history. Excellent for permanent sidebars." (if (cl-every #'listp (mapcar #'doom-unquote rules)) `(setq shackle-rules (nconc (list ,@rules) shackle-rules)) `(push (list ,@rules) shackle-rules))) @@ -509,7 +513,7 @@ the command buffer." ;; ;; By handing neotree over to shackle, which is better integrated into the ;; rest of my config (and persp-mode), this is no longer a problem. - (set! :popup " *NeoTree*" :align neo-window-position :size neo-window-width) + (set! :popup " *NeoTree*" :align neo-window-position :size neo-window-width :fixed t) (defun +evil-neotree-display-fn (buf _alist) "Hand neotree off to shackle."