On :killall, delete windows on *scratch*

This commit is contained in:
Henrik Lissner 2016-05-02 15:59:30 -04:00
parent cef05fe1f8
commit 7dbaf6c570

View file

@ -221,8 +221,9 @@ left, create a scratch buffer."
"Kill all project buffers. If BANG, kill *all* buffers (in workgroup)."
(interactive "<!>")
(narf--kill-buffers (narf/get-buffers (not bang)))
(when bang
(delete-other-windows)))
(mapc (lambda (w) (when (eq (window-buffer w) (get-buffer "*scratch*"))
(delete-window w)))
(narf/get-visible-windows)))
;;;###autoload (autoload 'narf:kill-other-buffers "defuns-buffers" nil t)
(evil-define-command narf:kill-other-buffers (&optional bang)