diff options
| author | Joris | 2022-10-09 17:46:26 +0200 |
|---|---|---|
| committer | Joris | 2022-10-09 17:46:26 +0200 |
| commit | e671d729c4ef3e9a1cfb631064192d94c77c7a55 (patch) | |
| tree | 9e6475040fde7356dd27861b2bb11a2a2e8a0591 | |
| parent | 3c935cc0728f25dab169d2a05dfa153242946c4a (diff) | |
Trim input when checking for emptyness
| -rw-r--r-- | src/gui/question.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/question.rs b/src/gui/question.rs index 8f9ee19..95f3163 100644 --- a/src/gui/question.rs +++ b/src/gui/question.rs @@ -64,7 +64,7 @@ pub fn ask<B: Backend>( let question = Paragraph::new(util::center_vertically(chunks[1], &card.question)) .style(match state.answer { Answer::Write => { - if state.input.is_empty() { + if state.input.trim().is_empty() { Style::default().fg(Color::Yellow) } else { Style::default() |
