diff --git a/userland/projects.el b/userland/projects.el index 124a9f0..23e92b3 100644 --- a/userland/projects.el +++ b/userland/projects.el @@ -50,13 +50,15 @@ (find-file (get-project-default-file dir)) (tab-rename (file-name-nondirectory (string-remove-suffix "/" dir))) (tab-bar-change-tab-group (concat "project: " dir)) ;; We use the tab group name to store the project working directory - (neotree-dir dir)))) + (save-selected-window + (neotree-dir dir))))) (defun theurgy-swap-to-tab-project () "Go to the project dir of the tab group." (let ((tab-group-name (tab-bar-tab-group-default (tab-bar--current-tab)))) (when (and tab-group-name (string-match-p "^project:" tab-group-name)) - (neotree-dir (string-remove-prefix "project: " tab-group-name))))) + (save-selected-window + (neotree-dir (string-remove-prefix "project: " tab-group-name)))))) (add-hook 'tab-bar-select-tab-hook #'theurgy-swap-to-tab-project)