That's the point: > It probably `worked' in readline-7.0 because readline didn't happen to > reprint the prompt when it was doing redisplay. Why should it reprint the prompt in this case? Thanks for the clarification, Laszlo
On Mon, Oct 17, 2022 at 5:44 PM Chet Ramey <[email protected]> wrote: > > 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 [email protected] http://tiswww.cwru.edu/~chet/ >
