1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

accesskey: start iterating with next link.

Rotating between links with the same accesskey works.

[ From commit c2d1952a08
  on the witekfl branch.  --KON ]
This commit is contained in:
Witold Filipczyk 2007-02-11 09:21:35 +01:00 committed by Kalle Olavi Niemitalo
parent 682ad62a97
commit d2970e57af

View File

@ -1224,7 +1224,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];
@ -1234,7 +1234,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) {