[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Superfluous newlines after ^D when using external event loop
From: |
Juerd Waalboer |
Subject: |
Re: Superfluous newlines after ^D when using external event loop |
Date: |
Mon, 12 Feb 2024 15:04:28 +0100 |
林宏雄 skribis 2024-02-12 22:47 (+0900):
The Perl wrapper Term::ReadLine::Gnu does not expose rl_eof_found,
FYI
https://github.com/hirooih/perl-trg/blob/master/Changes
1.43 2022-09-27
- readline-8.2 support
,,,
- new variables
- rl_eof_found
Thank you for pointing this out. I don't know why I didn't find this when I was
looking for it specifically, maybe a typo in my search.
This means that there are three ways to work around the issue, even with
Term::ReadLine::Gnu:
1. Use readline's built-in loop with $x->readline();
2. Set rl_eof_found to 0 through $x->Attribs->{eof_found} = 0;
3. Disable bracketed paste with $x->parse_and_bind("set enable-bracketed-paste
Off");
It would however be nice if readline itself does reset eof_found, so affected
older software would work as before the change.
--
Met vriendelijke groet, // Kind regards, // Korajn salutojn,
Juerd Waalboer <juerd@tnx.nl>
TNX