From 914b98a1c690874382a31a4f3c27bda517dcd48b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 13 Oct 2019 00:41:39 +0300 Subject: [PATCH] * lisp/tab-bar.el: Don't use minibuffer buffer name as tab name. * lisp/tab-bar.el (tab-bar-tab-name-selected-window): Use minibuffer-selected-window to get original window. --- lisp/tab-bar.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index c4eba8600ac..8abe14138a5 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -268,10 +268,11 @@ from all windows in the window configuration." (defun tab-bar-tab-name-selected-window () "Generate tab name from the buffer of the selected window. Also add the number of windows in the window configuration." - (let ((count (length (window-list-1 nil 'nomini)))) + (let ((count (length (window-list-1 nil 'nomini))) + (name (window-buffer (minibuffer-selected-window)))) (if (> count 1) - (format "%s (%d)" (buffer-name) count) - (format "%s" (buffer-name))))) + (format "%s (%d)" name count) + (format "%s" name)))) (defun tab-bar-tab-name-all-windows () "Generate tab name from buffers of all windows." -- 2.39.5