From 327c1db966ffb347d4ae301f3bca86dde799d7c7 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sat, 12 Oct 2024 22:16:00 +0200 Subject: bug fix: always select an entry --- Cargo.toml | 2 +- README.md | 27 ++++++++++++++------------- src/frontend/app.rs | 2 ++ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 01ac69f..678d3aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bibiman" -version = "0.2.2" +version = "0.3.1" authors = ["lukeflo "] license = "GPL-3.0-or-later" edition = "2021" diff --git a/README.md b/README.md index e6c18f7..87b2a03 100644 --- a/README.md +++ b/README.md @@ -65,18 +65,19 @@ updated: Use the following keybindings to manage the TUI: -| Key | Action | -| ---------------------------------------------------------------- | ------------------------------------------- | -| **jk** \| **DownUp** | Move selected list | -| **gG** | Go to first/last entry | -| **y** | Yank/copy citekey of selected entry | -| **e** | Open editor at selected entry | -| **o** \| **u** | Open related PDF \| URL/DOI | -| **TAB** | Switch between entries and keywords | -| **/** \| **Ctrl-f** | Enter search mode | -| **Enter** | Filter by selected keyword / Confirm search | -| **ESC** | Abort search / Reset current list | -| **q** \| **Ctrl-c** | Quit TUI | +| Key | Action | +| -------------------------------------------------------------------------------- | ------------------------------------------- | +| **jk** \| **DownUp** | Move selected list | +| **gG** | Go to first/last entry | +| **PageDownPageUp** \| **Alt-jAlt-k** | Scroll Info window | +| **y** | Yank/copy citekey of selected entry | +| **e** | Open editor at selected entry | +| **o** \| **u** | Open related PDF \| URL/DOI | +| **TAB** | Switch between entries and keywords | +| **/** \| **Ctrl-f** | Enter search mode | +| **Enter** | Filter by selected keyword / Confirm search | +| **ESC** | Abort search / Reset current list | +| **q** \| **Ctrl-c** | Quit TUI | ## Search @@ -135,7 +136,7 @@ for all my bib entries and want to use `bibiman` mainly as kind of terminal most of the time. I used `JabRef` for many years, but its way to bloated in my eyes. There exists -a bunch of other graphical tools. Just check it yourself... +a bunch of other graphical tools... But there are also some TUI alternatives with slightly different approaches. Maybe one of these might fit _your_ personal needs better: diff --git a/src/frontend/app.rs b/src/frontend/app.rs index 31383c7..8eb2e65 100644 --- a/src/frontend/app.rs +++ b/src/frontend/app.rs @@ -211,6 +211,7 @@ impl App { pub fn confirm_search(&mut self) { if let Some(FormerArea::EntryArea) = self.former_area { self.current_area = CurrentArea::EntryArea; + self.entry_table.entry_table_state.select(Some(0)) } else if let Some(FormerArea::TagArea) = self.former_area { self.current_area = CurrentArea::TagArea; self.tag_list.tag_list_state.select(Some(0)) @@ -224,6 +225,7 @@ impl App { pub fn break_search(&mut self) { if let Some(FormerArea::EntryArea) = self.former_area { self.current_area = CurrentArea::EntryArea; + self.entry_table.entry_table_state.select(Some(0)) } else if let Some(FormerArea::TagArea) = self.former_area { self.current_area = CurrentArea::TagArea; self.tag_list.tag_list_state.select(Some(0)) -- cgit v1.2.3