Integrate term toggle commands w/ persp-mode #1492
By namespacing the dedicated term buffers you get perspective-local popup terminals.
This commit is contained in:
parent
5e9c020c21
commit
43615c4d64
3 changed files with 46 additions and 31 deletions
|
@ -84,7 +84,12 @@
|
|||
Changes the PWD to the PWD of the buffer this command is executed from a new
|
||||
project (or if prefix ARG was present)."
|
||||
(interactive "P")
|
||||
(let ((eshell-buffer (get-buffer-create "*doom:eshell-popup*"))
|
||||
(let ((eshell-buffer
|
||||
(get-buffer-create
|
||||
(format "*doom:eshell-popup:%s*"
|
||||
(if (bound-and-true-p persp-mode)
|
||||
(safe-persp-name (get-current-persp))
|
||||
"main"))))
|
||||
(target-project (or (doom-project-root) default-directory))
|
||||
confirm-kill-processes
|
||||
current-prefix-arg)
|
||||
|
@ -105,6 +110,7 @@ project (or if prefix ARG was present)."
|
|||
(evil-change-to-initial-state))
|
||||
(goto-char (point-max)))
|
||||
(with-current-buffer (pop-to-buffer eshell-buffer)
|
||||
(doom|mark-buffer-as-real)
|
||||
(if (eq major-mode 'eshell-mode)
|
||||
(run-hooks 'eshell-mode-hook)
|
||||
(eshell-mode))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue