aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-03-19 16:20:11 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-03-19 16:20:11 +0000
commit96b464b67d8339aa5342c5e4ab0e4cfa654dc68d (patch)
treee62aae5572e7d16c17239194f9966388994cfbf1
parent[w3m-dev-en 00910] Re: autoconf: env MAKE not respected (diff)
downloadw3m-96b464b67d8339aa5342c5e4ab0e4cfa654dc68d.tar.gz
w3m-96b464b67d8339aa5342c5e4ab0e4cfa654dc68d.zip
[w3m-dev 03825] re-anchor for fold line
* anchor.c (reAnchorPos): fix for fold line From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
-rw-r--r--ChangeLog7
-rw-r--r--anchor.c9
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 25af422..f92a05a 100644
--- 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
@@ -7553,4 +7558,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.797 2003/03/19 16:18:32 ukai Exp $
+$Id: ChangeLog,v 1.798 2003/03/19 16:20:11 ukai Exp $
diff --git a/anchor.c b/anchor.c
index f7a7d08..38fda95 100644
--- a/anchor.c
+++ b/anchor.c
@@ -1,4 +1,4 @@
-/* $Id: anchor.c,v 1.26 2003/02/11 10:36:17 ukai Exp $ */
+/* $Id: anchor.c,v 1.27 2003/03/19 16:20:11 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include "regex.h"
@@ -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;