aboutsummaryrefslogtreecommitdiffstats
path: root/anchor.c
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 /anchor.c
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>
Diffstat (limited to '')
-rw-r--r--anchor.c9
1 files changed, 7 insertions, 2 deletions
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;