bug-readline
[Top][All Lists]
Advanced

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

Re: rl_already_prompted changed in version 8.1


From: Chet Ramey
Subject: Re: rl_already_prompted changed in version 8.1
Date: Mon, 17 Oct 2022 11:44:34 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.3

On 10/15/22 11:28 AM, Laszlo Csirmaz wrote:
I used the following yesno() procedure to handle the yes/no answer
from the user after printing some ugly question. This worked as
expected in version 7.0, but in 8.1 it stopped working. Any hints on
how to achieve the same effect?

rl_already_prompted requires that the application has printed rl_prompt,
not some random string that isn't the prompt passed to readline().
Otherwise, it has no way of knowing where the cursor is or the data
that's on the screen, which will corrupt redisplay.

It probably `worked' in readline-7.0 because readline didn't happen to
reprint the prompt when it was doing redisplay.

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