fix(tabs): error while centaur-tabs-mode is off
The hooks on `+doom-dashboard-mode-hook` and `+popup-buffer-mode-hook` will throw an error if centaur-tabs-mode is disabled, which may be the case if the user disables it interactively, post-startup. Fix #5196
This commit is contained in:
parent
2084eddf5f
commit
b1336e18ce
1 changed files with 5 additions and 2 deletions
|
@ -15,8 +15,11 @@
|
|||
centaur-tabs-cycle-scope 'tabs)
|
||||
|
||||
:config
|
||||
(add-hook '+doom-dashboard-mode-hook #'centaur-tabs-local-mode)
|
||||
(add-hook '+popup-buffer-mode-hook #'centaur-tabs-local-mode))
|
||||
(add-hook! '(+doom-dashboard-mode-hook +popup-buffer-mode-hook)
|
||||
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
|
||||
"Disable `centaur-tabs-mode' in current buffer."
|
||||
(when (centaur-tabs-mode-on-p)
|
||||
(centaur-tabs-local-mode)))))
|
||||
|
||||
|
||||
;; TODO tab-bar-mode (emacs 27)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue