[Top][All Lists]

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

Re: Multiline editing breaks if the previous output doesn't end in newli

From: Chet Ramey
Subject: Re: Multiline editing breaks if the previous output doesn't end in newline
Date: Mon, 31 Oct 2022 11:43:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

On 10/28/22 8:21 AM, Albert Vaca Cintora wrote:
Machine: All archs
OS: All OSes
Bash Version: All versions since I have memory

         When there's leftover output before the prompt (ie: when the
previous command output doesn't end in a new line), editing a
multi-line command from history doesn't correctly display what you

As I'm sure you'll hear again, readline assumes that it knows where the
physical cursor is on the line, and to assure this assumes it starts with
the cursor in column 0. The redisplay code assumes this. There is no
portable way for readline to determine the physical cursor location, so
it has to make assumptions.

There are various imperfect workarounds, but the easiest one is to hit

``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]