mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-16 17:19:41 +00:00
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
This commit is contained in:
parent
05c084cebb
commit
11e5c7d8ca
@ -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)
|
(if (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
|
||||||
(switch-to-prev-buffer window)
|
(switch-to-prev-buffer window)
|
||||||
(with-selected-window (or window (selected-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
|
(pos (seq-position
|
||||||
tabs (current-buffer)
|
tabs (current-buffer)
|
||||||
(lambda (tab 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)
|
(if (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
|
||||||
(switch-to-next-buffer window)
|
(switch-to-next-buffer window)
|
||||||
(with-selected-window (or window (selected-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
|
(pos (seq-position
|
||||||
tabs (current-buffer)
|
tabs (current-buffer)
|
||||||
(lambda (tab buffer)
|
(lambda (tab buffer)
|
||||||
|
Loading…
Reference in New Issue
Block a user