]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width.
authorJuri Linkov <juri@linkov.net>
Tue, 3 Sep 2019 20:47:46 +0000 (23:47 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 3 Sep 2019 20:47:46 +0000 (23:47 +0300)
lisp/tab-line.el

index da85925ff55fdcd1dc22e929095c3f0aaac21e8f..c678ce59bf86b08981d13aa31d211221946c5aa5 100644 (file)
@@ -126,8 +126,8 @@ Reduce tab width proportionally to space taken by other tabs."
                  (max 1 (- (/ (window-width) (length buffers)) 3)))))
     (if (or (not limit) (< (length tab-name) limit))
         tab-name
-      (propertize (concat tab-line-tab-name-ellipsis
-                          (substring tab-name (- limit)))
+      (propertize (truncate-string-to-width tab-name limit nil nil
+                                            tab-line-tab-name-ellipsis)
                   'help-echo tab-name))))
 
 (defvar tab-line-tabs-limit 15