diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-03-19 16:20:11 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-03-19 16:20:11 +0000 |
commit | 96b464b67d8339aa5342c5e4ab0e4cfa654dc68d (patch) | |
tree | e62aae5572e7d16c17239194f9966388994cfbf1 /anchor.c | |
parent | [w3m-dev-en 00910] Re: autoconf: env MAKE not respected (diff) | |
download | w3m-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; |