On Sun, Oct 02, 2022 at 09:43:47AM +1100, Cameron Simpson wrote:
> On 01Oct2022 09:33, Chris Green <c...@isbd.net> wrote:
> >As I said though it seems odd that only mutt suffers from the problem
> >(on my xubuntu systems anyway).  Presumably both 'less' and my editor
> >'vile' use ncurses too and they just wrap long lines if you tell them
> >to do so.
> 
> I'm pretty sure that less does not use curses (of whatever 
> implementation).  Termcap/terminfo, sure.  But not curses, which 
> maintains a model of the whole screen.
> 
Maybe not but my editor vile certainly does and it wraps the way I
want/expect.

> I have a (vague) recollection that some terminals keep track of whether 
> a line was terminates with a newline or not, and that it affects how 
> copy/paste was done, in that a newline causes a break in the string. But 
> the memory is vague.
> 
> 1) is your long string using the full width of the terminal? i.e. is 
> there a character in the rightmost column?
> 
A long line wrapped in the mutt pager looks exactly the same as a long
line wrapped in less or vile.  I.e. there are no added spaces or other
characters.  In fact if a browser address bar works correctly you can
select the multiple lines and paste them into the browser address bar
as the NLs are ignored.  However it's still messier than if the NLs
weren't there as you have to manually select the whole URL rather than
just right clicking on it.


> 2) if the text does go to the rightmost column, but you have a break in 
> the copied text, what's in that break? eg if you paste into an editor, 
> what gets inserted there?
> 
As noted above, I'm pretty sure it's a NL (i.e. a linefeed), I'll check.

Yes, it's a linefeed.  I.e. if you select the two halves of a 'broken'
line displayed in mutt's pager and paste them somewhere else there's a
0x0a character in the middle.

> Just curious, not sure this information would lead to a fix/workaround.
> 
As I said I'm discussing this with the maintainer of ncurses, if
anything comes of this I'll report back here.

-- 
Chris Green

Reply via email to