summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-23 09:24:40 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-23 09:24:40 +0200
commit6159042d0cb3870e6a7c6f8d9a97e175d59e6f80 (patch)
treec6422654298a744b0a791de8f1e8ccb8e1c55071 /docs
parent53071bb69f5d21b35b8a61c2b1dd18832ce781d4 (diff)
downloadbokf-6159042d0cb3870e6a7c6f8d9a97e175d59e6f80.tar.gz
bokf-6159042d0cb3870e6a7c6f8d9a97e175d59e6f80.zip
tui: 'g' + a letter searches list rows
The goto prompt decides on its first key: digits jump to a row number as before, any other printable key searches the row texts of the list or menu (case-insensitive, also åäö), with up/down stepping through the matches. Keys typed into the prompt no longer reach the screen's key hook, and Enter in the action menu closes an open prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/STATE.md6
-rw-r--r--docs/TUI-GUIDELINES.md5
2 files changed, 10 insertions, 1 deletions
diff --git a/docs/STATE.md b/docs/STATE.md
index d77cd78..9d954cd 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -14,6 +14,12 @@ unit tests and the docs consistency check.
## Resume here (2026-09-22)
+- **Goto search (2026-09-23, branch `eff/goto-search`)**: `g` followed by a
+ letter searches the row texts of any list or menu (case-insensitive, åäö
+ too; up/down = next/previous match); a digit still jumps to a row number.
+ Keys typed into the prompt no longer reach the screen's key hook, and
+ Enter in the F2 action menu closes an open prompt instead of running the
+ action.
- **Verifikat list/detail (2026-09-23, branch `eff/voucher-nav`)**: the
detail's columns are padded by display width (the header's `Benämning`
used to shift a column), zero amounts are blank, row texts and a `Summa`
diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md
index 4895c9f..c2aff3d 100644
--- a/docs/TUI-GUIDELINES.md
+++ b/docs/TUI-GUIDELINES.md
@@ -141,7 +141,7 @@ there.
| `Ctrl+R` | Reload the client in place: re-execs the installed binary and restores session, org, fiscal year and the current view (for after a rebuild) |
| `Ctrl+A` | Close or reopen the highlighted räkenskapsår (Räkenskapsår screen; asks for confirmation) |
| `1`–`9` | In lists: jump to that row. In menus: activate that item |
-| `g` | Live goto: "Gå till rad/nummer:" updates the selection as you type digits (backspace steps back); Enter closes the prompt without opening anything |
+| `g` | Live goto or search in every list and menu. The first key decides: a digit makes it "Gå till rad/nummer:" (the selection follows the number as you type, backspace steps back, `g` closes); any other printable key makes it "Sök:" — the selection jumps to the first row (from the top) whose text contains the typed text, case-insensitive also for åäö; up/down step to the next/previous match and wrap; "(ingen träff)" when nothing matches. Digits, `g`, `q` and screen keys (`s` = sortera, `d`…) are text while searching. Backspace to empty returns to the undecided prompt. Enter/Esc close the prompt without opening anything; the selection stays |
| arrows, PgUp/PgDn, Home/End | Move/scroll; selection always stays visible. Pages stop at the first/last row, they never wrap |
| `e` | Edit the shown object (IB, where applicable) |
| `a` | Add/upload (Underlag) |
@@ -373,6 +373,9 @@ only place that touches ncurses. Rules:
to the key hook (record stepping) and the footer says
`PgUp/PgDn/Home/End rullar` instead. Plain `tui_pager` keeps `s` on when a
save hint is passed. Pager lines go through `tui_markup` (see below).
+- `struct tui_list_nav.items` holds the row texts the goto search matches
+ (`tui_text_match`); `tui_select_list*`, `tui_menu` and `tui_action_menu`
+ set it. Keys typed into the goto prompt never reach a screen's key hook.
- Styles come from `tui_style`/`tui_style_attrs`; report markup and menu
sections from `tui_markup`/`TUI_MARK_HEADING`. Their fallbacks and the
navigation over section headers are unit-tested in `tests/test_tui.c`.