From 641d01f285c82d30d7d43c260c07145764750a0d Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 9 Oct 2022 18:06:12 +0200 Subject: Replace the cursor by a space in answer mode Prevent the response input to change width --- src/gui/question.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( 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 { -- cgit v1.2.3