summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2023-03-18 22:53:30 +0100
committerAlan Pearce2023-03-20 16:03:46 +0100
commit23b4dcb32b7f7fbf1c12d23030b9de02d64c955f (patch)
tree1475a69d9d9e090e80c8556bfd230e52959b89da /user
parent0bdb4336b16f5d689709a2414efa5d7643c71102 (diff)
downloadnixfiles-23b4dcb32b7f7fbf1c12d23030b9de02d64c955f.tar.lz
nixfiles-23b4dcb32b7f7fbf1c12d23030b9de02d64c955f.tar.zst
nixfiles-23b4dcb32b7f7fbf1c12d23030b9de02d64c955f.zip
emacs: don't delete eshell window on `exit` if last window
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el4
1 files changed, 3 insertions, 1 deletions
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