From 336787140801b3db949165da90aee89cebd52e57 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 3 Aug 2024 07:17:46 +0530 Subject: [PATCH] Fix #7690 --- kittens/ask/choices.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kittens/ask/choices.go b/kittens/ask/choices.go index 930ba85e8..39ab17c82 100644 --- a/kittens/ask/choices.go +++ b/kittens/ask/choices.go @@ -150,7 +150,7 @@ func GetChoices(o *Options) (response string, err error) { ctx := style.Context{AllowEscapeCodes: true} - draw_choice_boxes := func(y, screen_width, screen_height int, choices ...Choice) { + draw_choice_boxes := func(y, screen_width, _ int, choices ...Choice) { clickable_ranges = map[string][]Range{} width := screen_width - 2 current_line_length := 0 @@ -402,7 +402,7 @@ func GetChoices(o *Options) (response string, err error) { if ev.MatchesPressOrRepeat("esc") || ev.MatchesPressOrRepeat("ctrl+c") { ev.Handled = true lp.Quit(1) - } else if ev.MatchesPressOrRepeat("enter") { + } else if ev.MatchesPressOrRepeat("enter") || ev.MatchesPressOrRepeat("kp_enter") { ev.Handled = true response = response_on_accept lp.Quit(0)