diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-03-05 18:19:12 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-03-05 18:19:12 +0000 |
commit | 4299bb58dee8c3008ea98c2388cb89ee719b9800 (patch) | |
tree | cab37693a99caf61cda72cbbce65234a1ab46f80 /search.c | |
parent | [w3m-dev 03788] UFhalfclose (diff) | |
download | w3m-4299bb58dee8c3008ea98c2388cb89ee719b9800.tar.gz w3m-4299bb58dee8c3008ea98c2388cb89ee719b9800.zip |
[w3m-dev 03792] URL match string
incremental search fix
* main.c (chkURLBuffer): allow - at end of URL string
(dispincsrch): start from current position in case of
incremental search
* search.c (forwardSearch): found if same position
(backwardSearch): ditto
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r-- | search.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1,4 +1,4 @@ -/* $Id: search.c,v 1.27 2003/01/30 16:26:18 ukai Exp $ */ +/* $Id: search.c,v 1.28 2003/03/05 18:19:17 ukai Exp $ */ #include "fm.h" #include "regex.h" #include <signal.h> @@ -158,9 +158,6 @@ forwardSearch(Buffer *buf, char *str) continue; if (regexMatch(l->lineBuf, l->size, 1) == 1) { matchedPosition(&first, &last); - if (wrapped && l == begin && buf->pos == first - l->lineBuf) - /* exactly same match */ - break; pos = first - l->lineBuf; while (pos >= l->len && l->next && l->next->bpos) { pos -= l->len; @@ -268,13 +265,8 @@ backwardSearch(Buffer *buf, char *str) q = l->lineBuf; while (regexMatch(q, &l->lineBuf[l->size] - q, q == l->lineBuf) == 1) { matchedPosition(&first, &last); - if (wrapped && l == begin && buf->pos == first - l->lineBuf) - /* exactly same match */ - ; - else { - found = first; - found_last = last; - } + found = first; + found_last = last; if (q - l->lineBuf >= l->size) break; #ifdef JP_CHARSET |