pan = NULL;
    hseq = -1;
    for (i = 0; i < n; i++) {
       if (an)
           hseq = abs(an->hseq);
       an = NULL;
-       for (; y >= 0 && y <= Currentbuf->lastLine->linenumber; y += d) {
+       for (; y > 0 && y <= Currentbuf->lastLine->linenumber; y += d) {
+           if (d > 0)
+               for (j = 0; j < d; j++)
+                   l = l->next;
+           else
+               for (j = 0; j > d; j--)
+                   l = l->prev;
+           x = columnPos(l, Currentbuf->currentColumn + Currentbuf->visualpos - l->bwidth);
           an = retrieveAnchor(Currentbuf->href, y, x);
           if (!an)
               an = retrieveAnchor(Currentbuf->formitem, y, x);