v6.1.2: fix retry prompt

Broken since 2b0f8feb.
This commit is contained in:
Juerd Waalboer 2024-04-25 01:05:38 +02:00
parent f2d09b4da5
commit 6c74097707
2 changed files with 6 additions and 5 deletions

View file

@ -84,9 +84,6 @@ sub prompt($prompt, $completions = [], $default = "", $pos = 0, $cart = undef, $
# but it can be assigned through the corresponding .inputrc command.
$readline->parse_and_bind("set completion-ignore-case on");
$readline->insert_text($default);
$readline->Attribs->{point} = $pos;
my $begin = my $time = time;
$readline->Attribs->{event_hook} = sub {
@ -109,8 +106,12 @@ sub prompt($prompt, $completions = [], $default = "", $pos = 0, $cart = undef, $
}
};
$readline->Attribs->{startup_hook} = sub {
$readline->Attribs->{point} = $pos;
};
$readline->ornaments(0);
my $input = $readline->readline($prompt);
my $input = $readline->readline($prompt, $default);
print "\e[0m";

View file

@ -16,7 +16,7 @@ use RevBank::Messages;
use RevBank::Cart;
use RevBank::Prompt;
our $VERSION = "6.1.1";
our $VERSION = "6.1.2";
our %HELP1 = (
"abort" => "Abort the current transaction",
);