From ea73c66423ecb92e8aae4cabacd908168c095c07 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 14 Nov 2019 00:09:06 +0200 Subject: [PATCH] * lisp/tab-line.el (tab-line-tabs-buffer-list): Use window-prev-buffers too. * lisp/tab-line.el (tab-line-tabs-buffer-list): Move window-prev-buffers here from tab-line-tabs-buffer-groups. --- lisp/tab-line.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 6f5b40657a9..7701498ae29 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -288,7 +288,9 @@ Used only for `tab-line-tabs-mode-buffers' and `tab-line-tabs-buffer-groups'.") (defun tab-line-tabs-buffer-list () (seq-filter (lambda (b) (and (buffer-live-p b) (/= (aref (buffer-name b) 0) ?\s))) - (buffer-list))) + (seq-uniq (append (list (current-buffer)) + (mapcar #'car (window-prev-buffers)) + (buffer-list))))) (defun tab-line-tabs-mode-buffers () "Return a list of buffers with the same major mode with current buffer." @@ -363,11 +365,8 @@ If the major mode's name string matches REGEXP, use GROUPNAME instead.") (set-window-parameter nil 'tab-line-hscroll nil))))) (buffers (seq-filter (lambda (b) - (equal (tab-line-tabs-buffer-group-name b) - group)) - (seq-uniq (append (list (current-buffer)) - (mapcar #'car (window-prev-buffers)) - (funcall tab-line-tabs-buffer-list-function))))) + (equal (tab-line-tabs-buffer-group-name b) group)) + (funcall tab-line-tabs-buffer-list-function))) (sorted-buffers (if (functionp tab-line-tabs-buffer-group-sort-function) (seq-sort tab-line-tabs-buffer-group-sort-function buffers) -- 2.39.5