No space before first word when it is REJECTed

Cosmetic bug fix
This commit is contained in:
Juerd Waalboer 2023-11-24 06:19:21 +01:00
parent dbe75efe7f
commit ff819c25e2

12
revbank
View file

@ -17,7 +17,7 @@ use RevBank::Global;
use RevBank::Messages;
use RevBank::Cart;
our $VERSION = "4.2.2";
our $VERSION = "4.2.4";
our %HELP1 = (
"abort" => "Abort the current transaction",
);
@ -81,11 +81,11 @@ sub prompt($prompt, $plugins, $completions) {
});
if ($retry) {
my $trailing = "@{ pop @retry }";
my $rejected = pop @retry;
my $accepted = "@retry";
$readline->insert_text("$accepted $rejected $trailing");
$readline->Attribs->{point} = 1 + length $accepted;
my @trailing = @{ pop @retry };
my @rejected = pop @retry;
my @accepted = @retry;
$readline->insert_text(join " ", @accepted, @rejected, @trailing);
$readline->Attribs->{point} = @accepted ? 1 + length "@accepted" : 0;
@retry = ();
$retry = 0;
}