commit c949d9b62e365ac29589da19515c47667bde2a34
parent db4ec3d2345fb30a81a9ff265ee38242f65ca9c8
Author: inu <inu>
Date: Sat, 8 Apr 2006 11:33:16 +0000
check A tag in HTMLlineproc2body().
Diffstat:
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,10 @@
2006-04-08 Dai Sato <satodai@w3m.jp>
+ * [w3m-dev 04153] NEXT_LINK error
+ * anchor.c, filc.c, fm.h: check A tag in HTMLlineproc2body().
+
+2006-04-08 Dai Sato <satodai@w3m.jp>
+
* [w3m-dev 04152] [PATCH] Add more explanation for the usage of the option setting panel.
* doc(-jp)/FAQ.html, doc-jp/MANUAL.html: add explanations for .w3m/config and -o option.
diff --git a/anchor.c b/anchor.c
@@ -175,6 +175,8 @@ searchAnchor(AnchorList *al, char *str)
return NULL;
for (i = 0; i < al->nanchor; i++) {
a = &al->anchors[i];
+ if (a->hseq < 0)
+ continue;
if (!strcmp(a->url, str))
return a;
}
@@ -471,6 +473,7 @@ putHmarker(HmarkerList *ml, int line, int pos, int seq)
}
ml->marks[seq].line = line;
ml->marks[seq].pos = pos;
+ ml->marks[seq].invalid = 0;
return ml;
}
@@ -778,7 +781,7 @@ link_list_panel(Buffer *buf)
al = buf->href;
for (i = 0; i < al->nanchor; i++) {
a = &al->anchors[i];
- if (a->slave)
+ if (a->hseq < 0 || a->slave)
continue;
parseURL2(a->url, &pu, baseURL(buf));
p = parsedURL2Str(&pu)->ptr;
diff --git a/file.c b/file.c
@@ -5285,6 +5285,17 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
buf->hmarklist =
putHmarker(buf->hmarklist, currentLn(buf),
pos, hseq - 1);
+ else if (hseq < 0) {
+ int h = -hseq - 1;
+ if (buf->hmarklist &&
+ h < buf->hmarklist->nmark &&
+ buf->hmarklist->marks[h].invalid) {
+ buf->hmarklist->marks[h].pos = pos;
+ buf->hmarklist->marks[h].line = currentLn(buf);
+ buf->hmarklist->marks[h].invalid = 0;
+ hseq = -hseq;
+ }
+ }
if (id && idFrame)
idFrame->body->nameList =
putAnchor(idFrame->body->nameList, id, NULL,
@@ -5304,8 +5315,12 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit)
a_href->end.line = currentLn(buf);
a_href->end.pos = pos;
if (a_href->start.line == a_href->end.line &&
- a_href->start.pos == a_href->end.pos)
+ a_href->start.pos == a_href->end.pos) {
+ if (buf->hmarklist &&
+ a_href->hseq < buf->hmarklist->nmark)
+ buf->hmarklist->marks[a_href->hseq].invalid = 1;
a_href->hseq = -1;
+ }
a_href = NULL;
}
break;
diff --git a/fm.h b/fm.h
@@ -336,6 +336,7 @@ typedef struct _Line {
typedef struct {
int line;
int pos;
+ int invalid;
} BufferPoint;
#ifdef USE_IMAGE