0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00

[config] Added bool document.browse.links.follow_reload option. Refs #376

When enabled clicking the left mouse button on links, following links
etc. will cause reload of the page. The same as link-follow-reload action.
This commit is contained in:
Witold Filipczyk 2025-04-27 16:18:02 +02:00
parent 2f640240c5
commit f473a6c979
2 changed files with 10 additions and 0 deletions

View File

@ -330,6 +330,11 @@ static union option_info config_options_info[] = {
N_("Highlight links to directories in FTP and local directory "
"listing.")),
INIT_OPT_BOOL("document.browse.links", N_("Force reload when follow"),
"follow_reload", OPT_ZERO, 0,
N_("When enabled, following links, clicking the left mouse button on links, etc. will force reloading. "
"The same as the link-follow-reload action.")),
INIT_OPT_INT("document.browse.links", N_("Handling of hierbox's \"Go to\" button"),
"hierbox_goto", OPT_ZERO, 0, 3, 0,
N_("Define how to handle hierbox's \"Go to\" button (for example in bookmarks manager):\n"
@ -379,6 +384,7 @@ static union option_info config_options_info[] = {
N_("Open a message box when document has no tag with given "
"id.")),
INIT_OPT_INT("document.browse.links", N_("Number keys select links"),
"number_keys_select_link", OPT_ZERO, 0, 2, 1,
N_("Number keys select links rather than specify command "

View File

@ -588,6 +588,10 @@ do_follow_url(struct session *ses, struct uri *uri, char *target,
struct uri *referrer = NULL;
protocol_external_handler_T *external_handler;
if (cache_mode == CACHE_MODE_NORMAL && get_opt_bool("document.browse.links.follow_reload", ses)) {
cache_mode = CACHE_MODE_FORCE_RELOAD;
}
if (!uri) {
print_error_dialog(ses, connection_state(S_BAD_URL), uri, PRI_CANCEL);
return;