all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gabriel376@hotmail.com, 59620@debbugs.gnu.org
Subject: bug#59620: 29.0.50; Wrong global-mode-string position in tab-bar + emacs -nw
Date: Mon, 28 Nov 2022 19:29:38 +0200	[thread overview]
Message-ID: <868rjv9ed9.fsf@mail.linkov.net> (raw)
In-Reply-To: <83r0xnnsl0.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 28 Nov 2022 14:58:51 +0200")

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tab-bar-format-align-right.patch --]
[-- Type: text/x-diff, Size: 719 bytes --]

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 ()

  reply	other threads:[~2022-11-28 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26 21:46 bug#59620: 29.0.50; Wrong global-mode-string position in tab-bar + emacs -nw Gabriel
2022-11-27  6:19 ` Eli Zaretskii
2022-11-27  8:05   ` Gabriel
2022-11-28  7:54     ` Juri Linkov
2022-11-28 12:58       ` Eli Zaretskii
2022-11-28 17:29         ` Juri Linkov [this message]
2022-11-28 18:34           ` Eli Zaretskii
2022-12-02  7:59             ` Juri Linkov
2022-12-02 15:01               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868rjv9ed9.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=59620@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gabriel376@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.