bug-readline
[Top][All Lists]
Advanced

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

Re: Behaviour change in 8.0 with empty input and no prompt


From: Chet Ramey
Subject: Re: Behaviour change in 8.0 with empty input and no prompt
Date: Wed, 16 Nov 2022 10:03:10 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 11/16/22 12:19 AM, Kevin Pulo wrote:
Apologies if this has already been discussed; I tried searching the
mailing list, but came up empty.

I noticed that in readline 8.0 and later, if there is no prompt and I
press Enter with an empty input line, readline does not output a
newline.  Earlier versions of readline did output a newline in this
situation.

Yes, since the cursor is at position 0 on an empty line, the readline
redisplay suppresses the newline. This is the desired behavior when,
for instance, you have multiple input lines and the cursor has just
wrapped to the final line. Readline doesn't make a distinction between
cases here, so your example also has the final newline suppressed.


Was this change deliberate?  If so, is there a way to get the old
behaviour back (and if not, could an option be added)?  If the change
was not intentional, can it be considered a bug and the behaviour
reverted?

It's not a bug. It's a fix for this redisplay issue:

https://lists.gnu.org/archive/html/bug-readline/2018-09/msg00004.html

I could see making an exception if there is only one input line. Let me
look at that.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

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