From: Juri Linkov Date: Sat, 12 Oct 2019 21:41:39 +0000 (+0300) Subject: * lisp/tab-bar.el: Don't use minibuffer buffer name as tab name. X-Git-Tag: emacs-27.0.90~1120 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=914b98a1c690874382a31a4f3c27bda517dcd48b;p=emacs.git * 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. --- 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."