1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-26 01:15:37 +00:00

[search] document.browse.search.ignore_history . Default 0

When enabled will ignore previous searches in the typeahead mode
available by (cursor up, cursor down).
This commit is contained in:
Witold Filipczyk 2021-11-05 16:25:17 +01:00
parent 8e47f62c9d
commit 9d02cfdc46
2 changed files with 9 additions and 0 deletions

View File

@ -438,6 +438,11 @@ static union option_info config_options_info[] = {
N_("Whether the search should match the document text while "
"maintaining case sensitivity.")),
INIT_OPT_BOOL("document.browse.search", N_("Ignore history in typeahead"),
"ignore_history", 0, 0,
N_("Whether to ignore searching history in the typeahead mode. "
"Cursor up and cursor down will only show latest search results.")),
#ifdef CONFIG_TRE
INIT_OPT_INT("document.browse.search", N_("Regular expressions"),
"regex", 0, 0, 2, 0,

View File

@ -1832,6 +1832,10 @@ search_typeahead(struct session *ses, struct document_view *doc_view,
default:
if (doc_view->document->nlinks) {
handler = link_typeahead_handler;
if (get_opt_bool("document.browse.search.ignore_history", NULL)) {
history = NULL;
}
break;
}