1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[search] const in get_link_typeahead_search

This commit is contained in:
Witold Filipczyk 2022-02-21 19:20:09 +01:00
parent 020812bca2
commit 7b3ebd8fb3

View File

@ -1424,7 +1424,7 @@ typeahead_error(struct session *ses, char *typeahead, int no_further)
print_find_error_not_found(ses, N_("Typeahead"), message, typeahead); print_find_error_not_found(ses, N_("Typeahead"), message, typeahead);
} }
static inline char * static inline const char *
get_link_typeahead_text(struct link *link) get_link_typeahead_text(struct link *link)
{ {
char *name = get_link_name(link); char *name = get_link_name(link);
@ -1440,8 +1440,8 @@ static int
match_link_text(struct link *link, char *text, int textlen, match_link_text(struct link *link, char *text, int textlen,
int case_sensitive) int case_sensitive)
{ {
char *match = get_link_typeahead_text(link); const char *match = get_link_typeahead_text(link);
char *matchpos; const char *matchpos;
if (link_is_form(link) || textlen > strlen(match)) if (link_is_form(link) || textlen > strlen(match))
return -1; return -1;
@ -1547,7 +1547,7 @@ draw_typeahead_match(struct terminal *term, struct document_view *doc_view,
int xoffset = doc_view->box.x - doc_view->vs->x; int xoffset = doc_view->box.x - doc_view->vs->x;
int yoffset = doc_view->box.y - doc_view->vs->y; int yoffset = doc_view->box.y - doc_view->vs->y;
struct link *link = get_current_link(doc_view); struct link *link = get_current_link(doc_view);
char *text = get_link_typeahead_text(link); const char *text = get_link_typeahead_text(link);
int end = offset + chars; int end = offset + chars;
int i, j; int i, j;