aboutsummaryrefslogtreecommitdiff
path: root/src/ui.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-07-17 03:13:17 +0000
committerFuwn <[email protected]>2022-07-17 03:13:17 +0000
commit8f601a6ce9b5ebfb9ba143df4e74ff671507a389 (patch)
tree293367adca14ae617675266a93b1f9588192909c /src/ui.rs
parentfeat(input): enter clears error (diff)
downloadsydney-8f601a6ce9b5ebfb9ba143df4e74ff671507a389.tar.xz
sydney-8f601a6ce9b5ebfb9ba143df4e74ff671507a389.zip
fix(input): render colon as text, not input
Diffstat (limited to 'src/ui.rs')
-rw-r--r--src/ui.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui.rs b/src/ui.rs
index b43a119..44c7a04 100644
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -72,8 +72,10 @@ pub fn ui<B: tui::backend::Backend>(
Paragraph::new(&**error).style(Style::default().bg(Color::Red)),
chunks[2],
);
- } else if !app.input.is_empty() {
- f.render_widget(Paragraph::new(&*app.input), chunks[2]);
+ } else if !app.input.is_empty()
+ || app.input_mode == crate::input::Mode::Editing
+ {
+ f.render_widget(Paragraph::new(format!(":{}", app.input)), chunks[2]);
}
if app.accept_response_input {