bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] extra blank line on input that matches available width


From: Per Bothner
Subject: [Bug-readline] extra blank line on input that matches available width
Date: Sun, 9 Sep 2018 09:51:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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".

This is on Fedora 28 with TERM="xterm-256color" and 
BASH_VERSION="4.4.23(1)-release".
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

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