GNU bug report logs - #48257
[kisara.moe] 28.0.50; Align to right doesn't account for window separator in terminal frames

Previous Next

Package: emacs;

Reported by: mohkale <at> kisara.moe

Date: Thu, 6 May 2021 15:40:02 UTC

Severity: normal

Tags: notabug

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 48257 <at> debbugs.gnu.org (full text, mbox):

From: Kevin Boulain <kevinboulain <at> gmail.com>
To: 48257 <at> debbugs.gnu.org
Subject: Re: Align to right doesn't account for window separator in terminal
 frames
Date: Mon, 5 Jul 2021 23:04:38 +0200
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.




This bug report was last modified 4 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.