emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 914b98a: * lisp/tab-bar.el: Don't use minibuffer bu


From: Juri Linkov
Subject: [Emacs-diffs] master 914b98a: * lisp/tab-bar.el: Don't use minibuffer buffer name as tab name.
Date: Sat, 12 Oct 2019 17:41:46 -0400 (EDT)

branch: master
commit 914b98a1c690874382a31a4f3c27bda517dcd48b
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * 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 c4eba86..8abe141 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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]