Don't erase scratch buffer
This commit is contained in:
parent
4c52462282
commit
17590a394b
|
@ -96,13 +96,12 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
|||
the buffer if it is being displayed in another window."
|
||||
(interactive)
|
||||
(let (new-dir)
|
||||
(cond ((string-match-p "^\\*scratch\\*" (buffer-name))
|
||||
(erase-buffer))
|
||||
(t
|
||||
(setq new-dir (narf/project-root))
|
||||
(if (> (length (get-buffer-window-list (current-buffer) nil nil)) 1)
|
||||
(bury-buffer)
|
||||
(kill-this-buffer))))
|
||||
(if (string-match-p "^\\*scratch\\*" (buffer-name))
|
||||
(message "Already in the scratch buffer")
|
||||
(setq new-dir (narf/project-root))
|
||||
(if (> (length (get-buffer-window-list (current-buffer) nil nil)) 1)
|
||||
(bury-buffer)
|
||||
(kill-this-buffer)))
|
||||
(if (narf/popup-p (selected-window))
|
||||
(narf/popup-close)
|
||||
(unless (narf/real-buffer-p (current-buffer))
|
||||
|
|
Loading…
Reference in New Issue
Block a user