summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index a99627309..7f5a93934 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -264,13 +264,10 @@ sub ask_from__add_modify_remove {
while (1) {
my $c;
my @l = (@$l,
- map { my $s = $_; { val => translate($_), clicked_may_quit => sub { $c = $s; 1 } } }
- N_("Add"), if_(@{$e->{list}} > 0, N_("Modify"), N_("Remove")));
- $o->ask_from_({ title => $title, messages => $message, callbacks => \%callback }, \@l);
-
- return 1 if $c eq 'Done';
-
- $callback{$c}->($chosen_element);
+ map { my $s = $_; { val => translate($_), clicked_may_quit => sub { $callback{$s}->($chosen_element); $c = 1 } } }
+ N_("Add"), if_(@{$e->{list}} > 0, N_("Modify"), N_("Remove")));
+ $o->ask_from_({ title => $title, messages => $message, callbacks => \%callback }, \@l) or return;
+ return if !$c;
}
}
}