1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[links] Added bool document.browse.links.show_goto . Refs #127

This commit is contained in:
Witold Filipczyk 2021-09-23 11:36:26 +02:00
parent 7b2179be1f
commit 9f52b04f2a
4 changed files with 8 additions and 1 deletions

View File

@ -334,6 +334,10 @@ static union option_info config_options_info[] = {
"numbering", 0, 0,
N_("Display numbers next to the links.")),
INIT_OPT_BOOL("document.browse.links", N_("Show go to link number dialog"),
"show_goto", 0, 1,
N_("Display go to link number dialog, when links numbering is enabled.")),
INIT_OPT_INT("document.browse.links", N_("Handling of target=_blank"),
"target_blank", 0, 0, 3, 0,
N_("Define how to handle links having target=_blank set:\n"

View File

@ -87,6 +87,7 @@ init_document_options(struct session *ses, struct document_options *doo)
doo->wrap_nbsp = get_opt_bool("document.html.wrap_nbsp", ses);
doo->use_tabindex = get_opt_bool("document.browse.links.use_tabindex", ses);
doo->links_numbering = get_opt_bool("document.browse.links.numbering", ses);
doo->links_show_goto = get_opt_bool("document.browse.links.show_goto", ses);
doo->active_link.enable_color = get_opt_bool("document.browse.links.active_link.enable_color", ses);
doo->active_link.invert = get_opt_bool("document.browse.links.active_link.invert", ses);

View File

@ -115,6 +115,8 @@ struct document_options {
unsigned int plain:1;
unsigned int wrap:1;
unsigned int links_show_goto:1;
/* XXX: Everything past this comment is specialy handled by compare_opt() */
char *framename;

View File

@ -1227,7 +1227,7 @@ try_prefix_key(struct session *ses, struct document_view *doc_view,
|| ses->kbdprefix.repeat_count /* The user has already begun
* entering a prefix. */
|| !doc_opts->num_links_key
|| (doc_opts->num_links_key == 1 && !doc_opts->links_numbering)) {
|| (doc_opts->num_links_key == 1 && (!doc_opts->links_numbering || !doc_opts->links_show_goto))) {
int old_count = ses->kbdprefix.repeat_count;
int new_count = old_count * 10 + digit;