1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-02 02:15:28 +00:00

accesskey: start iterating with next link.

Rotating between links with the same accesskey works.
This commit is contained in:
Witold Filipczyk 2007-02-11 09:21:35 +01:00 committed by Witold Filipczyk
parent 5008fb697d
commit c2d1952a08

View File

@ -1228,7 +1228,7 @@ try_document_key(struct session *ses, struct document_view *doc_view,
/* Run through all the links and see if one of them is bound to the
* key we test.. */
i = doc_view->vs->current_link >= 0 ? doc_view->vs->current_link : 0;
i = doc_view->vs->current_link + 1;
for (; i < doc_view->document->nlinks; i++) {
struct link *link = &doc_view->document->links[i];
@ -1238,7 +1238,7 @@ try_document_key(struct session *ses, struct document_view *doc_view,
return FRAME_EVENT_REFRESH;
}
}
for (i = 0; i < doc_view->vs->current_link; i++) {
for (i = 0; i <= doc_view->vs->current_link; i++) {
struct link *link = &doc_view->document->links[i];
if (key == link->accesskey) {