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.

[ Backported from commit d2970e57af
  in ELinks 0.12.GIT.  --KON ]
This commit is contained in:
Witold Filipczyk 2007-02-11 09:21:35 +01:00 committed by Kalle Olavi Niemitalo
parent 94ff057a6c
commit 8104dc80cd

View File

@ -1107,7 +1107,7 @@ try_document_key(struct session *ses, struct document_view *doc_view,
* key we test.. */
key = get_kbd_key(ev);
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];
@ -1117,7 +1117,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) { /* FIXME: key vs unicode ... */