all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Boulain <kevinboulain@gmail.com>
To: 48257@debbugs.gnu.org
Subject: bug#48257: Align to right doesn't account for window separator in terminal frames
Date: Mon, 5 Jul 2021 23:04:38 +0200	[thread overview]
Message-ID: <CABaj1X_ezsC4X2FYjcLC3t_VMrnM2Eur7broE4Rs1=5Siwkp_w@mail.gmail.com> (raw)
In-Reply-To: <20210506151653.31575A08EB@mail.kisara.moe>

I believe I have a similar issue (I think this behavior has been
present for a while).
Paste and eval this in the scratch buffer (emacs -Q, running from a terminal):
(global-set-key (kbd "<f10>")
                (lambda ()
                  (interactive)
                  ;; 4 chars margin
                  (setq-local right-margin-width 4)
                  ;; force margin to take effect
                  (set-window-buffer (selected-window) (current-buffer))
                  ;; insert in the margin
                  (insert (propertize " " 'display '((margin
right-margin) "1234") 'default t))
                  ;; split the window, should showcase the issue
                  (split-window-right)))

Then press F10 (doesn't matter where the point is): it will set up a
right margin of width 4, insert "1234" then split the window into two.
The window on the left will only show "123" ("4" is probably hidden
behind the window divider) while the right window correctly shows
"1234".
Some packages try to put information in the right margin, but it gets truncated.





  parent reply	other threads:[~2021-07-05 21:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 15:16 bug#48257: [kisara.moe] 28.0.50; Align to right doesn't account for window separator in terminal frames mohkale
2021-05-06 15:48 ` Eli Zaretskii
2021-05-06 16:05   ` bug#48257: [kisara.moe] Re: [kisara.moe] " mohkale
2021-05-06 16:43     ` Eli Zaretskii
2021-05-11 16:44 ` Eli Zaretskii
     [not found]   ` <877dk55h90.fsf@kisara.moe>
2021-05-11 17:19     ` bug#48257: [kisara.moe] Re: [kisara.moe] " Eli Zaretskii
2021-05-11 17:26       ` Eli Zaretskii
2021-05-11 17:40       ` bug#48257: [kisara.moe] Re: [kisara.moe] " Mohsin Kaleem
2021-07-05 21:04 ` Kevin Boulain [this message]
2021-07-06 12:49   ` bug#48257: " Eli Zaretskii
2021-07-06 17:13     ` Eli Zaretskii
     [not found]       ` <CABaj1X9fTfYcZ8bcLHvLtmseyQeVspL3-wF2pN6DC_uLgMny4A@mail.gmail.com>
2021-07-08  6:24         ` 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='CABaj1X_ezsC4X2FYjcLC3t_VMrnM2Eur7broE4Rs1=5Siwkp_w@mail.gmail.com' \
    --to=kevinboulain@gmail.com \
    --cc=48257@debbugs.gnu.org \
    /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.