]> 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:39:16 +0000 (20:39 +0300)
committerJuri Linkov <juri@linkov.net>
Sun, 22 Oct 2023 17:39:16 +0000 (20:39 +0300)
(tab-bar-auto-width): Take into account the length of tab-bar-close-button
more than one character: " x".
Don't merge to master.

lisp/tab-bar.el

index 17fc4b346cbd35dbf1594498a01e5b4e7df465a9..7a493ddde0d34fd5ec571477e025cd7bd3d7ae64 100644 (file)
@@ -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)