diff options
Diffstat (limited to 'src/views.rs')
-rw-r--r-- | src/views.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/views.rs b/src/views.rs index f06978c..e11b844 100644 --- a/src/views.rs +++ b/src/views.rs | |||
@@ -59,7 +59,14 @@ where | |||
59 | }, | 59 | }, |
60 | ]), | 60 | ]), |
61 | |p| { | 61 | |p| { |
62 | p.print((0, 0), &format!(" {} ", self.name())); | 62 | p.print( |
63 | (0, 0), | ||
64 | &format!( | ||
65 | " {:.width$} ", | ||
66 | self.name(), | ||
67 | width = CONFIGURATION.view_width - 6 | ||
68 | ), | ||
69 | ); | ||
63 | }, | 70 | }, |
64 | ); | 71 | ); |
65 | 72 | ||
@@ -136,7 +143,7 @@ where | |||
136 | fn on_event(&mut self, e: Event) -> EventResult { | 143 | fn on_event(&mut self, e: Event) -> EventResult { |
137 | let now = Local::now().naive_utc().date(); | 144 | let now = Local::now().naive_utc().date(); |
138 | if self.is_auto() { | 145 | if self.is_auto() { |
139 | return EventResult::Consumed(None); | 146 | return EventResult::Ignored; |
140 | } | 147 | } |
141 | match e { | 148 | match e { |
142 | Event::Key(Key::Enter) | Event::Char('n') => { | 149 | Event::Key(Key::Enter) | Event::Char('n') => { |