requestty/termion-snapshots/multi_select__helpers__on_esc.snap
Lutetium-Vanadium aa1d2cb54b Add support for handling abort with Esc
Earlier, when the user pressed the `Esc` key, nothing would happen as
`ui::Input` would just pass the event on to the prompt. Now 2 other
actions can be specified.

`OnEsc::Terminate`: returns an `Err` which will propagate upwards,
essentially cancelling the `PromptModule`

`OnEsc::SkipQuestion`: returns `None`, showing that the question has
been skipped

Implements #6
2022-01-18 18:33:13 +08:00

29 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
source: tests/helpers/mod.rs
assertion_line: 31
expression: self.backend
---
┌──────────────────────────────────────────────────┐
? message (Press <space> to select, <a> to toggle │
all, <i> to invert selection) │
 ✔ Choice 0 │
Separator 1 │
────────────── │
✔ Choice 3 │
✔ Choice 4 │
Separator 5 │
✔ Choice 6 │
✔ Choice 7 │
✔ Choice 8 │
✔ Choice 9 │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────┘