From 93857d067517bdb908e386beb0e90e223c7c8b5d Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Wed, 1 Sep 2021 15:35:58 +0200 Subject: [PATCH] Don't render todo list and prevent focusing it This is a very quick and dirty fix, but I can strip out the entire todo functionality later. --- src/layout.rs | 4 ++-- src/tracc.rs | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/layout.rs b/src/layout.rs index 120f2ed..c4fc68d 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -23,9 +23,9 @@ pub fn layout(r: Rect) -> Vec { .direction(Direction::Vertical) .constraints( [ + Constraint::Percentage(0), + Constraint::Percentage(60), Constraint::Percentage(40), - Constraint::Percentage(40), - Constraint::Percentage(20), ] .as_ref(), ) diff --git a/src/tracc.rs b/src/tracc.rs index c83be4a..fb20417 100644 --- a/src/tracc.rs +++ b/src/tracc.rs @@ -39,7 +39,7 @@ impl Tracc { times: TimeSheet::open_or_create(JSON_PATH_TIME), terminal, input_mode: Mode::Normal, - focus: Focus::Top, + focus: Focus::Bottom, } } @@ -87,12 +87,6 @@ impl Tracc { } } Key::Char('p') => with_focused!(ListView::paste), - Key::Char('\t') => { - self.focus = match self.focus { - Focus::Top => Focus::Bottom, - Focus::Bottom => Focus::Top, - } - } _ => (), }, Mode::Insert => match input {