fix(tabs): workaround for ema2159/centaur-tabs#231
`centaur-tabs-line-tab' reads `centaur-tabs-ace-jump-keys' without length guards. If there are fewer entries than you have tabs, you'll see an error (ema2159/centaur-tabs#231), and because the function is inlined and monolithic, advising its behavior is non-trivial. This workaround will mitigate it until it's dealt with upstream. Ref: ema2159/centaur-tabs#231
This commit is contained in:
parent
a61e2912cf
commit
56f33bc7ed
1 changed files with 11 additions and 1 deletions
|
@ -42,8 +42,18 @@
|
||||||
(assq (current-buffer) centaur-tabs--buffers))))
|
(assq (current-buffer) centaur-tabs--buffers))))
|
||||||
(car (nth 2 buf))
|
(car (nth 2 buf))
|
||||||
(setq time now)
|
(setq time now)
|
||||||
(funcall fn))))))
|
(funcall fn)))))
|
||||||
|
|
||||||
|
;; This is deferred twice to ensure these settings apply *after* any user
|
||||||
|
;; configuration!
|
||||||
|
(after! centaur-tabs
|
||||||
|
;; HACK: `centaur-tabs-line-tab' reads `centaur-tabs-ace-jump-keys' without
|
||||||
|
;; length guards. If there are fewer entries than you have tabs, you'll
|
||||||
|
;; see an error (ema2159/centaur-tabs#231).
|
||||||
|
;; REVIEW: Remove when ema2159/centaur-tabs#231 is dealt with.
|
||||||
|
(when (< (length centaur-tabs-ace-jump-keys) 100)
|
||||||
|
(setq centaur-tabs-ace-jump-keys
|
||||||
|
(append centaur-tabs-ace-jump-keys (make-list 100 ?\ ))))))
|
||||||
|
|
||||||
;; TODO tab-bar-mode (emacs 27)
|
;; TODO tab-bar-mode (emacs 27)
|
||||||
;; TODO tab-line-mode (emacs 27)
|
;; TODO tab-line-mode (emacs 27)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue