aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-03-05 18:19:12 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-03-05 18:19:12 +0000
commit4299bb58dee8c3008ea98c2388cb89ee719b9800 (patch)
treecab37693a99caf61cda72cbbce65234a1ab46f80
parent[w3m-dev 03788] UFhalfclose (diff)
downloadw3m-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--ChangeLog12
-rw-r--r--main.c5
-rw-r--r--search.c14
3 files changed, 17 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index f461269..167ff08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-03-06 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [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
+
2003-03-03 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03788] UFhalfclose
@@ -7297,4 +7307,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.770 2003/03/02 15:09:24 ukai Exp $
+$Id: ChangeLog,v 1.771 2003/03/05 18:19:12 ukai Exp $
diff --git a/main.c b/main.c
index 8f00db4..71d9e8a 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.215 2003/02/26 17:22:03 ukai Exp $ */
+/* $Id: main.c,v 1.216 2003/03/05 18:19:15 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1603,6 +1603,7 @@ dispincsrch(int ch, Str buf, Lineprop *prop)
if (ch == 0 && buf == NULL) {
SAVE_BUFPOSITION(&sbuf); /* search starting point */
currentLine = sbuf.currentLine;
+ sbuf.pos -= 1; /* XXX start from current position */
pos = sbuf.pos;
return -1;
}
@@ -4649,7 +4650,7 @@ void
chkURLBuffer(Buffer *buf)
{
static char *url_like_pat[] = {
- "https?://[a-zA-Z0-9][a-zA-Z0-9:%\\-\\./?=~_\\&+@#,\\$;]*[a-zA-Z0-9_/=]",
+ "https?://[a-zA-Z0-9][a-zA-Z0-9:%\\-\\./?=~_\\&+@#,\\$;]*[a-zA-Z0-9_/=\\-]",
"file:/[a-zA-Z0-9:%\\-\\./=_\\+@#,\\$;]*",
#ifdef USE_GOPHER
"gopher://[a-zA-Z0-9][a-zA-Z0-9:%\\-\\./_]*",
diff --git a/search.c b/search.c
index f6ea92c..9c65c1c 100644
--- a/search.c
+++ b/search.c
@@ -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