bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] extra blank line on input that matches available widt


From: Chet Ramey
Subject: Re: [Bug-readline] extra blank line on input that matches available width
Date: Sun, 9 Sep 2018 16:17:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 9/9/18 12:51 PM, Per Bothner wrote:
> A minor blemish: We get an extra blank line when the input length
> (including prompt) is exactly the width
> of the terminal, and the cursor is not at the end.
> 
> The case when the cursor is at the end of the input works, without the
> extra blank line.
> I.e. assume an 80-character line width, a 20-character prompt, and you've
> typed 60 characters.
> The cursor is at the beginning of a blank continuation line. If Enter is
> typed, then readline
> emits "\e[A\r\n", which is perfect (since it clears the earlier line-wrap
> marker).
> (FWIW neither zsh or fish handle this case as well.)
> 
> However, if after typing 60 characters, you go back one or more characters
> (say by typing LeftArrow),
> followed by an Enter, then readline emits "\r\n\r\r\n", so we get an extra
> blank line.
> In this case readline should just emit "\r\n".

The redisplay is just leaving the last visible line alone. In this case,
though, it's blank. Let's see if this patch fixes it.

Chet

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

Attachment: empty-lastline.patch
Description: Text document


reply via email to

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