bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48257: Align to right doesn't account for window separator in termin


From: Eli Zaretskii
Subject: bug#48257: Align to right doesn't account for window separator in terminal frames
Date: Tue, 06 Jul 2021 15:49:42 +0300

> From: Kevin Boulain <kevinboulain@gmail.com>
> 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".

I don't think it's related, I think it's a separate issue.  Notice how
the truncated "123" string starts 2 columns after the "$" truncation
indicator, whereas the un-truncated "1234" starts only 1 column after
"$".

So I think there's something else at work here, and will take a closer
look soon.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]