~rjarry/aerc-discuss

4 4

trailing spaces when copying text from the pager with the mouse

Details
Message ID
<D7VW8G3MK656.3QJQ6Y6ZZHFT8@debian.org>
Sender timestamp
1739918155
DKIM signature
pass
Download raw message
Hi,

When I copy a message displayed in the pager with the mouse, and paste
the result for example in another tab, I get a lot of trailing spaces.
My pager is `less`.

This does not happen when I copy text from the `less` pager run
independently in the terminal.

Does it happen to anyone else? If yes, what is your way around this?

Thanks,

Cédric
Vojtěch Káně <vojta001@vkane.cz>
Details
Message ID
<D7VWIEP0YY5C.1UYNZ875SW6Y6@vkane.cz>
In-Reply-To
<D7VW8G3MK656.3QJQ6Y6ZZHFT8@debian.org> (view parent)
Sender timestamp
1739918935
DKIM signature
pass
Download raw message
Hello,

>When I copy a message displayed in the pager with the mouse, and paste 
>the result for example in another tab, I get a lot of trailing spaces. 
>My pager is `less`.

does it happen for all messages, or only for some? Does _a lot of 
trailing spaces_ mean one after almost every line? If so, it may 
actually be `format=flowed` what you are observing.

Vojta
Details
Message ID
<2118fa81-65f5-4ee4-b200-0e9ccf2006df@app.fastmail.com>
In-Reply-To
<D7VW8G3MK656.3QJQ6Y6ZZHFT8@debian.org> (view parent)
Sender timestamp
1739922782
DKIM signature
pass
Download raw message
Hi Cédric,

This is due to how aerc embedded terminal renders lines. I was told by Tim that it could be fixable.

I am not sure how exactly but I think it would involve writing a line termination sequence instead of drawing spaces until the end of the screen.

Tim, could you draft a patch for vaxis term?

Cheers
Details
Message ID
<D7WM5HV0BE2S.2O5D3IHJUXCNT@debian.org>
In-Reply-To
<D7VWIEP0YY5C.1UYNZ875SW6Y6@vkane.cz> (view parent)
Sender timestamp
1739991272
DKIM signature
pass
Download raw message
> does it happen for all messages, or only for some? Does _a lot of 
> trailing spaces_ mean one after almost every line? If so, it may 
> actually be `format=flowed` what you are observing.

Yes it happens with all messages: in the copied result, all lines have
the same length, everything is padded on the right with spaces. This is
exactly what Robin describes. Having such a patch for line termination
instead of extra spaces would be just great.

Cheers,
Details
Message ID
<D7WMBCEFY0X9.15E4F45Q3I8YG@sindominio.net>
In-Reply-To
<D7WM5HV0BE2S.2O5D3IHJUXCNT@debian.org> (view parent)
Sender timestamp
1739991731
DKIM signature
pass
Download raw message

On 19/02/2025, 18:54, Cédric Boutillier wrote:
> Having such a patch for line termination instead of extra spaces would be just great.

It'd be even better if such a patch removed all whitespace after *and also before* the lines: some of us have our pager centered (with `pr -T -o $((($(tput cols) - 78)/2))`), which introduces a left gutter composed by spaces, and, while it's beautiful, it's kinda annoying when copypasting. ^_^
Reply to thread Export thread (mbox)