summaryrefslogtreecommitdiff
path: root/lisp/tab-line.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2020-03-17 01:11:27 +0200
committerJuri Linkov <juri@linkov.net>2020-03-17 01:11:27 +0200
commita2dd8c4234c9a858e273ea22129962cee58fa4ce (patch)
treeb03eafdf921904c79004723932bf4c08af1beb5d /lisp/tab-line.el
parenta7b8291b6c97de10cd8f6a559987a6cda8fa3d9a (diff)
downloademacs-a2dd8c4234c9a858e273ea22129962cee58fa4ce.tar.gz
* 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.
Diffstat (limited to 'lisp/tab-line.el')
-rw-r--r--lisp/tab-line.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 902c312ce14..53fa984caf6 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.