diff options
author | Alan Pearce | 2023-03-18 22:53:30 +0100 |
---|---|---|
committer | Alan Pearce | 2023-03-20 16:03:46 +0100 |
commit | 23b4dcb32b7f7fbf1c12d23030b9de02d64c955f (patch) | |
tree | 1475a69d9d9e090e80c8556bfd230e52959b89da | |
parent | 0bdb4336b16f5d689709a2414efa5d7643c71102 (diff) | |
download | nixfiles-23b4dcb32b7f7fbf1c12d23030b9de02d64c955f.tar.lz nixfiles-23b4dcb32b7f7fbf1c12d23030b9de02d64c955f.tar.zst nixfiles-23b4dcb32b7f7fbf1c12d23030b9de02d64c955f.zip |
emacs: don't delete eshell window on `exit` if last window
-rw-r--r-- | user/emacs/init.el | 4 |
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 |