mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
get_current_link_info(): simplify code flow.
This commit is contained in:
parent
ac5441db9e
commit
59c8dcc473
@ -1269,11 +1269,7 @@ get_current_link_info(struct session *ses, struct document_view *doc_view)
|
|||||||
|
|
||||||
/* TODO: Provide info about script event hooks too. --pasky */
|
/* TODO: Provide info about script event hooks too. --pasky */
|
||||||
|
|
||||||
if (link_is_form(link)) {
|
if (!link_is_form(link)) {
|
||||||
if (!get_link_form_control(link)) return NULL;
|
|
||||||
|
|
||||||
return get_form_info(ses, doc_view);
|
|
||||||
} else {
|
|
||||||
struct terminal *term = ses->tab->term;
|
struct terminal *term = ses->tab->term;
|
||||||
struct string str;
|
struct string str;
|
||||||
unsigned char *uristring = link->where;
|
unsigned char *uristring = link->where;
|
||||||
@ -1302,4 +1298,8 @@ get_current_link_info(struct session *ses, struct document_view *doc_view)
|
|||||||
decode_uri_string_for_display(&str);
|
decode_uri_string_for_display(&str);
|
||||||
return str.source;
|
return str.source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!get_link_form_control(link)) return NULL;
|
||||||
|
|
||||||
|
return get_form_info(ses, doc_view);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user