summaryrefslogtreecommitdiff
path: root/lisp/tab-bar.el
diff options
context:
space:
mode:
authorPetteri Hintsanen <petterih@iki.fi>2023-10-22 20:40:35 +0300
committerJuri Linkov <juri@linkov.net>2023-10-22 20:41:14 +0300
commitf39cd59ed477628be20353bf921b0afb423165b9 (patch)
treee4bd605db73c56f913fda9b165e61ff0f1bf8070 /lisp/tab-bar.el
parent4ff0c738d050942932e73c627a7d6e31ca5c6244 (diff)
downloademacs-f39cd59ed477628be20353bf921b0afb423165b9.tar.gz
* lisp/tab-bar.el: Fix the close button with auto-width (bug#66678).
(tab-bar-auto-width): Take into account the length of tab-bar-close-button more than one character: " x".
Diffstat (limited to 'lisp/tab-bar.el')
-rw-r--r--lisp/tab-bar.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index d2815c03ebf..e21367255a0 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1227,7 +1227,9 @@ tab bar might wrap to the second line when it shouldn't.")
((< prev-width width)
(let* ((space (apply #'propertize " "
(text-properties-at 0 name)))
- (ins-pos (- len (if close-p 1 0)))
+ (ins-pos (- len (if close-p
+ (length tab-bar-close-button)
+ 0)))
(prev-name name))
(while continue
(setq name (concat (substring name 0 ins-pos)