feat(workspaces): make tab-bar tabs workspace-local
This commit is contained in:
parent
aac3c15cde
commit
191745424b
2 changed files with 21 additions and 1 deletions
|
@ -572,6 +572,20 @@ This be hooked to `projectile-after-switch-project-hook'."
|
|||
(run-hooks 'projectile-after-switch-project-hook)
|
||||
(setq +workspaces--project-dir nil)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspaces-save-tab-bar-data-h (_)
|
||||
"Save the current workspace's tab bar data."
|
||||
(when (get-current-persp)
|
||||
(set-persp-parameter
|
||||
'tab-bar-tabs (tab-bar-tabs))
|
||||
(set-persp-parameter 'tab-bar-closed-tabs tab-bar-closed-tabs)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspaces-load-tab-bar-data-h (_)
|
||||
"Restores the tab bar data of the workspace we have just switched to."
|
||||
(tab-bar-tabs-set (persp-parameter 'tab-bar-tabs))
|
||||
(setq tab-bar-closed-tabs (persp-parameter 'tab-bar-closed-tabs))
|
||||
(tab-bar--update-tab-bar-lines t))
|
||||
|
||||
;;
|
||||
;;; Advice
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue