aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2006-04-08 11:33:16 +0000
committerDai Sato <satodai@w3m.jp>2006-04-08 11:33:16 +0000
commita60d99eb7b09e4d219bfdff0e787430a087699be (patch)
treeed201e768b69d97a3eba545bd57ea3e627f3dcc0 /file.c
parentadd explanations for .w3m/config and -o option. (diff)
downloadw3m-a60d99eb7b09e4d219bfdff0e787430a087699be.tar.gz
w3m-a60d99eb7b09e4d219bfdff0e787430a087699be.zip
check A tag in HTMLlineproc2body().
Diffstat (limited to 'file.c')
-rw-r--r--file.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/file.c b/file.c
index fc4cecf..21cdcb0 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.241 2006/04/07 15:48:56 inu Exp $ */
+/* $Id: file.c,v 1.242 2006/04/08 11:33:16 inu Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -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;