[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 a2dd8c4: * lisp/tab-line.el: Fix tab-line-format and tab-line-f
From: |
Juri Linkov |
Subject: |
emacs-27 a2dd8c4: * lisp/tab-line.el: Fix tab-line-format and tab-line-format-template. |
Date: |
Mon, 16 Mar 2020 19:11:34 -0400 (EDT) |
branch: emacs-27
commit a2dd8c4234c9a858e273ea22129962cee58fa4ce
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* lisp/tab-line.el: Fix tab-line-format and tab-line-format-template.
* lisp/tab-line.el (tab-line-format): Use buffer-name in the cache key
instead of just buffer object to invalidate the cache on buffer renaming.
(tab-line-format-template): Always leave the separator after the last tab
like tab-bar.el already does.
---
lisp/tab-line.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 902c312..53fa984 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -453,9 +453,10 @@ variable `tab-line-tabs-function'."
(> (length strings) 1))
tab-line-right-button)))
(if hscroll (nthcdr (truncate hscroll) strings) strings)
- (when (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
- (list (concat separator (when tab-line-new-tab-choice
- tab-line-new-button)))))))
+ (list separator)
+ (when (and (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
+ tab-line-new-tab-choice)
+ (list tab-line-new-button)))))
(defvar tab-line-auto-hscroll)
@@ -463,7 +464,7 @@ variable `tab-line-tabs-function'."
"Template for displaying tab line for selected window."
(let* ((tabs (funcall tab-line-tabs-function))
(cache-key (list tabs
- (window-buffer)
+ (buffer-name (window-buffer))
(window-parameter nil 'tab-line-hscroll)))
(cache (window-parameter nil 'tab-line-cache)))
;; Enable auto-hscroll again after it was disabled on manual scrolling.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-27 a2dd8c4: * lisp/tab-line.el: Fix tab-line-format and tab-line-format-template.,
Juri Linkov <=