mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
field_op: use goto_link (micro-optimisation)
Use the newly introduced goto_link instead of goto_current_link in field_op since field_op already looks up the current link.
This commit is contained in:
parent
9e5d79a803
commit
d17a632417
@ -1657,7 +1657,7 @@ field_op(struct session *ses, struct document_view *doc_view,
|
||||
/* FIXME: We should maybe have ACT_EDIT_ENTER_RELOAD */
|
||||
if ((has_form_submit(fc->form)
|
||||
&& !get_opt_bool("document.browse.forms.auto_submit", ses))
|
||||
|| goto_current_link(ses, doc_view, 0)) {
|
||||
|| goto_link(ses, doc_view, link, 0)) {
|
||||
if (ses->insert_mode == INSERT_MODE_ON)
|
||||
ses->insert_mode = INSERT_MODE_OFF;
|
||||
status = FRAME_EVENT_OK;
|
||||
|
@ -943,7 +943,7 @@ call_onsubmit_and_submit(struct session *ses, struct document_view *doc_view,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct link *
|
||||
struct link *
|
||||
goto_link(struct session *ses, struct document_view *doc_view, struct link *link, int do_reload)
|
||||
{
|
||||
struct uri *uri;
|
||||
|
@ -47,6 +47,7 @@ int next_link_in_dir(struct document_view *doc_view, int dir_x, int dir_y);
|
||||
void jump_to_link_number(struct session *ses, struct document_view *doc_view, int);
|
||||
|
||||
struct link *goto_current_link(struct session *ses, struct document_view *, int);
|
||||
struct link *goto_link(struct session *ses, struct document_view *, struct link *, int);
|
||||
void goto_link_number(struct session *ses, unsigned char *num);
|
||||
void get_link_x_bounds(struct link *link, int y, int *min_x, int *max_x);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user