mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[search] Introduced "document.browse.search.reset". Refs #76
Default 1, old behaviour, but if you set it to 0, you can search once, and view results everywhere.
This commit is contained in:
parent
434ce282ce
commit
44c1f77ba4
@ -439,6 +439,12 @@ static union option_info config_options_info[] = {
|
||||
"2 for extended regular expression searches")),
|
||||
#endif
|
||||
|
||||
INIT_OPT_BOOL("document.browse.search", N_("Reset searching on new pages"),
|
||||
"reset", 0, 1,
|
||||
N_("Whether to clear search, when visiting new pages, or going back "
|
||||
"in history. Default 1. If you set it to 0, you can search once and "
|
||||
"see results on every page.")),
|
||||
|
||||
INIT_OPT_BOOL("document.browse.search", N_("Show search hit top or bottom dialogs"),
|
||||
"show_hit_top_bottom", 0, 1,
|
||||
N_("Whether to show a dialog when the search hits the top or "
|
||||
|
@ -103,7 +103,9 @@ ses_history_move(struct session *ses)
|
||||
/* Prepare. */
|
||||
|
||||
free_files(ses);
|
||||
mem_free_set(&ses->search_word, NULL);
|
||||
if (get_opt_bool("document.browse.search.reset", NULL)) {
|
||||
mem_free_set(&ses->search_word, NULL);
|
||||
}
|
||||
|
||||
/* Does it make sense? */
|
||||
|
||||
|
@ -312,7 +312,9 @@ ses_forward(struct session *ses, int loaded_in_frame)
|
||||
|
||||
if (!loaded_in_frame) {
|
||||
free_files(ses);
|
||||
mem_free_set(&ses->search_word, NULL);
|
||||
if (get_opt_bool("document.browse.search.reset", NULL)) {
|
||||
mem_free_set(&ses->search_word, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
x:
|
||||
|
Loading…
Reference in New Issue
Block a user