mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
tools/term: ensure terms are opened in the correct directory
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
"Open a terminal buffer in the current window. If PROJECT-ROOT (C-u) is
|
"Open a terminal buffer in the current window. If PROJECT-ROOT (C-u) is
|
||||||
non-nil, cd into the current project's root."
|
non-nil, cd into the current project's root."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let ((default-directory (if project-root (doom-project-root) default-directory)))
|
(let ((default-directory (if project-root (doom-project-root 'nocache) default-directory)))
|
||||||
(call-interactively #'multi-term)))
|
(call-interactively #'multi-term)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
@ -14,7 +14,7 @@ non-nil, cd into the current project's root."
|
|||||||
current project's root."
|
current project's root."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(require 'multi-term)
|
(require 'multi-term)
|
||||||
(let ((default-directory (if project-root (doom-project-root) default-directory))
|
(let ((default-directory (if project-root (doom-project-root 'nocache) default-directory))
|
||||||
(buffer (multi-term-get-buffer current-prefix-arg)))
|
(buffer (multi-term-get-buffer current-prefix-arg)))
|
||||||
(pop-to-buffer buffer)
|
(pop-to-buffer buffer)
|
||||||
(setq multi-term-buffer-list (nconc multi-term-buffer-list (list buffer)))
|
(setq multi-term-buffer-list (nconc multi-term-buffer-list (list buffer)))
|
||||||
|
Reference in New Issue
Block a user