fix(workspaces): check before loading tab configuration

Fix: #7139
This commit is contained in:
roife 2023-10-05 23:46:46 +08:00 committed by GitHub
parent da99d39e4d
commit 1a2789c922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -598,8 +598,9 @@ This be hooked to `projectile-after-switch-project-hook'."
;;;###autoload
(defun +workspaces-load-tab-bar-data-from-file-h (&rest _)
"Restores the tab bar data from file."
(tab-bar-tabs-set (persp-parameter 'tab-bar-tabs))
(tab-bar--update-tab-bar-lines t))
(when-let ((persp-tab-data (persp-parameter 'tab-bar-tabs)))
(tab-bar-tabs-set persp-tab-data)
(tab-bar--update-tab-bar-lines t)))
;;
;;; Advice