summaryrefslogtreecommitdiff
path: root/lisp/tab-line.el
diff options
context:
space:
mode:
authorMatt Kramer <mkramer@lbl.gov>2021-11-24 21:41:52 +0200
committerJuri Linkov <juri@linkov.net>2021-11-24 21:42:32 +0200
commit11e5c7d8ca58cc946930048b5c88c8f582d4d5d8 (patch)
treea420b4e574a8f8bccb4af669875cda10007f3132 /lisp/tab-line.el
parent05c084cebb3d4c857a5aa20219d8c638913f07f3 (diff)
downloademacs-11e5c7d8ca58cc946930048b5c88c8f582d4d5d8.tar.gz
Fix tab-line cycling when using buffer groups (bug#52050)
* lisp/tab-line.el (tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab): Remove tabs that aren't associated with a buffer, such as the `group-tab' that exists when `tab-line-tabs-function' is `tab-line-tabs-buffer-groups'. Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/tab-line.el')
-rw-r--r--lisp/tab-line.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 110c6e96969..af0647acf7c 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -792,7 +792,9 @@ Its effect is the same as using the `previous-buffer' command
(if (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
(switch-to-prev-buffer window)
(with-selected-window (or window (selected-window))
- (let* ((tabs (funcall tab-line-tabs-function))
+ (let* ((tabs (seq-filter
+ (lambda (tab) (or (bufferp tab) (assq 'buffer tab)))
+ (funcall tab-line-tabs-function)))
(pos (seq-position
tabs (current-buffer)
(lambda (tab buffer)
@@ -816,7 +818,9 @@ Its effect is the same as using the `next-buffer' command
(if (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
(switch-to-next-buffer window)
(with-selected-window (or window (selected-window))
- (let* ((tabs (funcall tab-line-tabs-function))
+ (let* ((tabs (seq-filter
+ (lambda (tab) (or (bufferp tab) (assq 'buffer tab)))
+ (funcall tab-line-tabs-function)))
(pos (seq-position
tabs (current-buffer)
(lambda (tab buffer)