summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 17fc4b346cb..7a493ddde0d 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1091,7 +1091,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
(setf (substring name ins-pos ins-pos) space)