summaryrefslogtreecommitdiff
path: root/clients/tui.h
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tui.h')
-rw-r--r--clients/tui.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/clients/tui.h b/clients/tui.h
index c4fe116..4ae0da6 100644
--- a/clients/tui.h
+++ b/clients/tui.h
@@ -130,14 +130,23 @@ int tui_choice_prompt(const char *label, const char *const *opts, int n,
struct tui_list_nav {
int n, sel, top, view, numw;
- char gotobuf[12];
+ char gotobuf[64];
char gotolabel[32];
int goto_active;
+ /* The goto prompt became a search: its first key was not a digit. */
+ int goto_search;
+ int goto_miss; /* the search text matches no row */
/* Optional row flags: 0 marks a non-selectable row (a menu section
header). Navigation, numbering and goto skip them. */
const unsigned char *selectable;
+ /* Optional row texts for the goto search; NULL: digits only. */
+ const char *const *items;
};
+/* Whether needle occurs in hay, ignoring case for ASCII and the Latin-1
+ letters (Å/Ä/Ö/É…). An empty needle matches. Pure. */
+int tui_text_match(const char *hay, const char *needle);
+
/* Returns the selected index, or -1 back, -2 refresh, -4 new, -6 remove,
-7 toggle, TUI_NAV_NONE when nothing happened. */
int tui_nav_key(struct tui_list_nav *v, int ch, int allow_new,