requestty/termion-snapshots/password__helpers__on_esc-3.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.6 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.

---
source: tests/helpers/mod.rs
assertion_line: 31
expression: self.backend
---
┌──────────────────────────────────────────────────┐
✖ message · Skipped │
  │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────┘