From: Juri Linkov Date: Tue, 3 Sep 2019 20:47:46 +0000 (+0300) Subject: * lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width. X-Git-Tag: emacs-27.0.90~1328^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1598de6ef216746649493b788f98b4972fd750af;p=emacs.git * lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width. --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index da85925ff55..c678ce59bf8 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -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