:group 'tab-bar
:version "27.1")
-(defvar tab-bar-tab-name-ellipsis
- (if (char-displayable-p ?…) "…" "..."))
+(defvar tab-bar-tab-name-ellipsis nil)
(defun tab-bar-tab-name-truncated ()
"Generate tab name from the buffer of the selected window.
Truncate it to the length specified by `tab-bar-tab-name-truncated-max'.
Append ellipsis `tab-bar-tab-name-ellipsis' in this case."
- (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window)))))
+ (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))
+ (ellipsis (cond
+ (tab-bar-tab-name-ellipsis)
+ ((char-displayable-p ?…) "…")
+ ("..."))))
(if (< (length tab-name) tab-bar-tab-name-truncated-max)
tab-name
(propertize (truncate-string-to-width
tab-name tab-bar-tab-name-truncated-max nil nil
- tab-bar-tab-name-ellipsis)
+ ellipsis)
'help-echo tab-name))))
\f