(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
+ ;; The `right' spec doesn't work on TTY frames
+ ;; when windows are split horizontally (bug#59620)
+ (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 ()
(setf (substring name ins-pos ins-pos) space)
(setq curr-width (string-pixel-width name))
(if (and (< curr-width width)
- (not (eq curr-width prev-width)))
+ (> curr-width prev-width))
(setq prev-width curr-width
prev-name name)
;; Set back a shorter name
(setf (substring name del-pos1 del-pos2) "")
(setq curr-width (string-pixel-width name))
(if (and (> curr-width width)
- (not (eq curr-width prev-width)))
+ (< curr-width prev-width))
(setq prev-width curr-width)
(setq continue nil)))
(let* ((len (length name))