summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/interactive.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index e23206d4c..84c5fe6cc 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -123,8 +123,10 @@ sub ask_from_listf_no_check {
my ($o, $title, $message, $f, $l, $def, $help) = @_;
if (@$l <= 2) {
- ask_from_entries_refH_powered_no_check($o, { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]), cancel => $l->[1] && may_apply($f, $l->[1]) }, [])
- ? $l->[0] : $l->[1];
+ ask_from_entries_refH_powered_no_check($o,
+ { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]),
+ if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, []
+ ) ? $l->[0] : $l->[1];
} else {
ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]);
$def;