From 1598de6ef216746649493b788f98b4972fd750af Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 3 Sep 2019 23:47:46 +0300 Subject: [PATCH] * lisp/tab-line.el (tab-line-tab-name): Try to use truncate-string-to-width. --- lisp/tab-line.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2