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 /main.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 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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:%\\-\\./_]*", |