From 0489c8a4cb5b589576dca8e4d393c230c8d9ad16 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 15 Nov 2024 12:47:26 +0100 Subject: some minor fixes --- src/app.rs | 4 ---- src/tui/popup.rs | 2 ++ src/tui/ui.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/app.rs b/src/app.rs index 1a9b9c6..3268649 100644 --- a/src/app.rs +++ b/src/app.rs @@ -140,8 +140,6 @@ impl App { } CurrentArea::PopupArea => { if let Some(PopupKind::Help) = self.bibiman.popup_area.popup_kind { - // self.bibiman.popup_area.popup_scroll_pos = - // self.bibiman.popup_area.popup_scroll_pos + 1 self.bibiman.popup_area.popup_scroll_down(); } } @@ -157,8 +155,6 @@ impl App { } CurrentArea::PopupArea => { if let Some(PopupKind::Help) = self.bibiman.popup_area.popup_kind { - // self.bibiman.popup_area.popup_scroll_pos = - // self.bibiman.popup_area.popup_scroll_pos - 1 self.bibiman.popup_area.popup_scroll_up(); } } diff --git a/src/tui/popup.rs b/src/tui/popup.rs index 9011a3b..08abfb0 100644 --- a/src/tui/popup.rs +++ b/src/tui/popup.rs @@ -28,6 +28,7 @@ pub enum PopupKind { Help, Message, Selection, + Search, } #[derive(Debug, Default)] @@ -47,6 +48,7 @@ impl PopupArea { ("TAB: ", "Toggle areas (Entries, Keywords)"), ("/|Ctrl+f: ", "Enter search mode"), ("q|Ctrl+c: ", "Quit bibiman"), + ("?: ", "Show help"), ("Entry Table", "sub"), ("j,k|↓,↑: ", "Select next/previous entry"), ("h,l|←,→: ", "Select next/previous column"), diff --git a/src/tui/ui.rs b/src/tui/ui.rs index fed893f..c1fa658 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -210,7 +210,7 @@ pub fn render_header(frame: &mut Frame, rect: Rect) { } pub fn render_footer(app: &mut App, frame: &mut Frame, rect: Rect) { - match &app.bibiman.current_area { + match app.bibiman.current_area { CurrentArea::SearchArea => { let search_title = { match app.bibiman.former_area { -- cgit v1.2.3