From 23b4dcb32b7f7fbf1c12d23030b9de02d64c955f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 18 Mar 2023 22:53:30 +0100 Subject: emacs: don't delete eshell window on `exit` if last window --- user/emacs/init.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'user/emacs') diff --git a/user/emacs/init.el b/user/emacs/init.el index 5def6aee..ff9c6902 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -702,7 +702,9 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (concat (eshell/pwd) "\n$ ")) eshell-prompt-regexp "^[$][[:blank:]]" eshell-cmpl-cycle-completions nil) - (add-hook 'eshell-exit-hook #'evil-window-delete))) + (add-hook 'eshell-exit-hook (lambda () + (when (window-deletable-p) + (delete-window)))))) (use-package eshell-toggle :after projectile -- cgit 1.4.1