commit cba044f29481bf00ba6c2cb9b17c0d3874390a69
parent a28ff7b3ebbdde4704d6f5a55869cccf597cb003
Author: ukai <ukai>
Date: Wed, 19 Mar 2003 16:20:11 +0000
[w3m-dev 03825] re-anchor for fold line
* anchor.c (reAnchorPos): fix for fold line
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-20 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03825] re-anchor for fold line
+ * anchor.c (reAnchorPos): fix for fold line
+
2003-03-20 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev-en 00910] Re: autoconf: env MAKE not respected
diff --git a/anchor.c b/anchor.c
@@ -304,6 +304,11 @@ reAnchorPos(Buffer *buf, Line *l, char *p1, char *p2,
}
for (i = spos; i < epos; i++)
l->propBuf[i] |= PE_ANCHOR;
+ while (spos > l->len && l->next && l->next->bpos) {
+ spos -= l->len;
+ epos -= l->len;
+ l = l->next;
+ }
while (1) {
a = anchorproc(buf, p1, p2, l->linenumber, spos);
a->hseq = hseq;
@@ -312,7 +317,7 @@ reAnchorPos(Buffer *buf, Line *l, char *p1, char *p2,
hseq = a->hseq;
}
a->end.line = l->linenumber;
- if (epos > l->len) {
+ if (epos > l->len && l->next && l->next->bpos) {
a->end.pos = l->len;
spos = 0;
epos -= l->len;