aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2022-10-09 18:06:12 +0200
committerJoris2022-10-09 18:06:12 +0200
commit641d01f285c82d30d7d43c260c07145764750a0d (patch)
treec720e39794911890beedb2460378ba3fddfa0376
parentfb38e8fd9ba849860e301a68cdd262b286c05711 (diff)
downloadflashcards-641d01f285c82d30d7d43c260c07145764750a0d.tar.gz
flashcards-641d01f285c82d30d7d43c260c07145764750a0d.tar.bz2
flashcards-641d01f285c82d30d7d43c260c07145764750a0d.zip
Replace the cursor by a space in answer mode
Prevent the response input to change width
-rw-r--r--src/gui/question.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/question.rs b/src/gui/question.rs
index 37101c1..33adabc 100644
--- a/src/gui/question.rs
+++ b/src/gui/question.rs
@@ -77,7 +77,7 @@ pub fn ask<B: Backend>(
let formatted_input = match state.answer {
Answer::Write => format!("{}█", state.input),
- _ => state.input.clone(),
+ _ => format!("{} ", state.input),
};
let answer = Paragraph::new(util::center_vertically(chunks[2], &formatted_input))
.style(match state.answer {