mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-20 16:11:07 -05:00
Don't mess up popups/neotree buffer when moving/swapping buffers
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
(neotree-dir project-root))
|
||||
(neotree-find path project-root)))))
|
||||
|
||||
;;;###autoload
|
||||
(defmacro narf/neotree-save (&rest body)
|
||||
`(let ((neo-p (neo-global--window-exists-p)))
|
||||
(when neo-p (neotree-hide))
|
||||
,@body
|
||||
(when neo-p
|
||||
(save-selected-window
|
||||
(neotree-show)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf|neotree-close-on-window-change (&rest _)
|
||||
"Close neotree to prevent ensuing mindow buggery."
|
||||
|
@@ -15,6 +15,15 @@
|
||||
(-any? (lambda (w) (eq window w)) narf-popup-windows)
|
||||
t)))
|
||||
|
||||
;;;###autoload
|
||||
(defmacro narf/popup-save (&rest body)
|
||||
`(let ((popup-p (narf/popup-p)))
|
||||
(when popup-p (narf/popup-close-all t))
|
||||
,@body
|
||||
(when popup-p
|
||||
(save-selected-window
|
||||
(narf/popup-last-buffer)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/popup-buffer (buffer &optional plist)
|
||||
"Display BUFFER in a shackle popup."
|
||||
|
Reference in New Issue
Block a user