diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index eb4cec48619..cabad9d7d5e 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -936,7 +936,10 @@ tab-bar-format-align-right (hpos (progn (add-face-text-property 0 (length rest) 'tab-bar t rest) (string-pixel-width rest))) - (str (propertize " " 'display `(space :align-to (- right (,hpos)))))) + (str (propertize " " 'display + (if window-system + `(space :align-to (- right (,hpos))) + `(space :align-to (,(- (frame-inner-width) hpos))))))) `((align-right menu-item ,str ignore)))) (defun tab-bar-format-global ()