From d2970e57af189164275f334b8d0d5d505294fcc7 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 11 Feb 2007 09:21:35 +0100 Subject: [PATCH] accesskey: start iterating with next link. Rotating between links with the same accesskey works. [ From commit c2d1952a082e2ed51dbfb6895f29c0869a89a8a3 on the witekfl branch. --KON ] --- src/viewer/text/link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer/text/link.c b/src/viewer/text/link.c index 2e1ae52c..2c500074 100644 --- a/src/viewer/text/link.c +++ b/src/viewer/text/link.c @@ -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) { -- 2.11.4.GIT