aboutsummaryrefslogtreecommitdiffstats
path: root/anchor.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-03-29 16:39:37 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-03-29 16:39:37 +0000
commitc6b76b9c8778661e639801fe52a8cd3cbfd0f8bc (patch)
treeecba8d56187a0c0293bc96a7dfd850bebd5e7236 /anchor.c
parent[w3m-dev 03159] "ttp:" is marked instead of "http:" by MARL_URL (diff)
downloadw3m-c6b76b9c8778661e639801fe52a8cd3cbfd0f8bc.tar.gz
w3m-c6b76b9c8778661e639801fe52a8cd3cbfd0f8bc.zip
[w3m-dev 03160] Re: "ttp:" is marked instead of "http:" by MARL_URL
* NEWS: * anchor.c (reAnchorAny): check MarkAllPages * fm.h (MarkAllPages): added * rc.c (CMT_MARK_ALL_PAGES): added (mark_all_pages): added From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'anchor.c')
-rw-r--r--anchor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/anchor.c b/anchor.c
index 7f864ee..d62f2ef 100644
--- a/anchor.c
+++ b/anchor.c
@@ -1,4 +1,4 @@
-/* $Id: anchor.c,v 1.9 2002/01/31 18:28:24 ukai Exp $ */
+/* $Id: anchor.c,v 1.10 2002/03/29 16:39:37 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include "regex.h"
@@ -295,7 +295,9 @@ reAnchorAny(Buffer *buf, char *re,
if ((re = regexCompile(re, 1)) != NULL) {
return re;
}
- for (l = buf->firstLine; l != NULL; l = l->next) {
+ for (l = MarkAllPages ? buf->firstLine : buf->topLine; l != NULL &&
+ (MarkAllPages || l->linenumber < buf->topLine->linenumber + LASTLINE);
+ l = l->next) {
p = l->lineBuf;
for (;;) {
if (regexMatch(p, &l->lineBuf[l->len] - p, p == l->lineBuf) == 1) {