]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/tab-bar.el: Don't use minibuffer buffer name as tab name.
authorJuri Linkov <juri@linkov.net>
Sat, 12 Oct 2019 21:41:39 +0000 (00:41 +0300)
committerJuri Linkov <juri@linkov.net>
Sat, 12 Oct 2019 21:41:39 +0000 (00:41 +0300)
* lisp/tab-bar.el (tab-bar-tab-name-selected-window):
Use minibuffer-selected-window to get original window.

lisp/tab-bar.el

index c4eba8600ac2da8858368a56de74d2714c97f12e..8abe14138a5d77028ccefa25eff20f500322ddb3 100644 (file)
@@ -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."