pub fn open<'a, I: Display>(
prompt: &'a str,
items: &'a [I],
) -> Result<Option<&'a I>>Expand description
Prompt the user to select an item from a numbered list.
Displays prompt followed by numbered items via the Vimscript
inputlist() function and returns the chosen element (1-based user
index translated to 0-based). Returns None if the user cancels.
ยงErrors
- Invoking
inputlist()fails. - The returned index cannot be converted to
usize(negative or overflow).