Don't mess up popups/neotree buffer when moving/swapping buffers
This commit is contained in:
parent
fb25f716f9
commit
a5ff60224d
4 changed files with 31 additions and 4 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue