Skip to content

Commit

Permalink
Merge pull request #6026 from kit-ty-kate/fix-10-menu-options
Browse files Browse the repository at this point in the history
Fix OpamConsole.menu > 9 options
  • Loading branch information
kit-ty-kate authored Jun 18, 2024
2 parents fd31f1e + c72a9af commit 62ad0c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ users)
* Bump the version number after the release of 2.2.0~beta3 [#6009 @kit-ty-kate]

## Global CLI
* Fix OpamConsole.menu > 9 options [#6026 @kit-ty-kate]

## Plugins

Expand Down
2 changes: 1 addition & 1 deletion src/core/opamConsole.ml
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ let menu ?default ?unsafe_yes ?yes ~no ~options fmt =
let options_nums =
let option_of_index n =
(* NOTE: 1..9 (starts at ASCII 49) & a..z (starts at ASCII 97) *)
(String.make 1 (char_of_int (if n < 9 then n+49 else n+97)))
(String.make 1 (char_of_int (if n < 9 then n+49 else (n-9)+97)))
in
List.mapi (fun n (ans, _) -> ans, option_of_index n) options
in
Expand Down

0 comments on commit 62ad0c2

Please sign in to comment.