GNU bug report logs -
#59620
29.0.50; Wrong global-mode-string position in tab-bar + emacs -nw
Previous Next
Reported by: Gabriel <gabriel376 <at> hotmail.com>
Date: Sat, 26 Nov 2022 21:52:02 UTC
Severity: normal
Found in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 59620 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> On TTY frames the tab bar is not a window, so what I wrote is impossible,
> and thus avoiding the 'right' part in the align-to spec is a good idea
> regardless.
Avoiding the 'right' part in align-to has such a drawback that while
resizing the frame the position of the aligned element is not updated
immediately. It's updated only when display-time refreshes the time on
the tab bar. The position relative to the right edge has no such problem.
So better to leave the 'right' part on GUI frames, and switch to counting
from the left only on TTY frames where frames are resized less often:
[tab-bar-format-align-right.patch (text/x-diff, inline)]
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 ()
This bug report was last modified 2 years and 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.