From 6c67975be92c095efc4f577f8f75481a070ec389 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Tue, 5 Nov 2024 16:25:30 -0500 Subject: [PATCH] chore: refactor some stuff for editability --- src/ui/mod.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 7c41ecf..55a0f26 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -131,8 +131,17 @@ impl<'ws> Workspace<'ws> { fn render_help_text(&self) -> impl Widget { let info_block = Block::bordered().title("Help"); Paragraph::new(match self.state.modality { - Modality::Navigate => "Navigate Mode:\n* e: Enter edit mode for current cell\n* h,j,k,l: vim style navigation\n* q exit\n* Ctrl-S Save sheet", - Modality::CellEdit => "Edit Mode:\n ESC: Exit edit mode\nOtherwise edit as normal", + Modality::Navigate => Text::from(vec![ + "Navigate Mode:".into(), + "* e: Enter edit mode for current cell".into(), + "* h,j,k,l: vim style navigation".into(), + "* q exit\n* Ctrl-S Save sheet".into(), + ]), + Modality::CellEdit => Text::from(vec![ + "Edit Mode:".into(), + "* ESC: Exit edit mode".into(), + "Otherwise edit as normal".into(), + ]), }).block(info_block) }