]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/tab-bar.el: Fix the close button with auto-width (bug#66678).
authorPetteri Hintsanen <petterih@iki.fi>
Sun, 22 Oct 2023 17:40:35 +0000 (20:40 +0300)
committerJuri Linkov <juri@linkov.net>
Sun, 22 Oct 2023 17:41:14 +0000 (20:41 +0300)
(tab-bar-auto-width): Take into account the length of tab-bar-close-button
more than one character: " x".

lisp/tab-bar.el

index d2815c03ebf9e47ceae6b68e28099b4011d99b6e..e21367255a0cf947b816065696c9bb8d12b4a7d7 100644 (file)
@@ -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)