[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>
This commit is contained in:
@@ -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>
|
2003-03-03 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev 03788] UFhalfclose
|
* [w3m-dev 03788] UFhalfclose
|
||||||
@@ -7297,4 +7307,4 @@ a * [w3m-dev 03276] compile error on EWS4800
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-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 $
|
||||||
|
|||||||
@@ -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
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -1603,6 +1603,7 @@ dispincsrch(int ch, Str buf, Lineprop *prop)
|
|||||||
if (ch == 0 && buf == NULL) {
|
if (ch == 0 && buf == NULL) {
|
||||||
SAVE_BUFPOSITION(&sbuf); /* search starting point */
|
SAVE_BUFPOSITION(&sbuf); /* search starting point */
|
||||||
currentLine = sbuf.currentLine;
|
currentLine = sbuf.currentLine;
|
||||||
|
sbuf.pos -= 1; /* XXX start from current position */
|
||||||
pos = sbuf.pos;
|
pos = sbuf.pos;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -4649,7 +4650,7 @@ void
|
|||||||
chkURLBuffer(Buffer *buf)
|
chkURLBuffer(Buffer *buf)
|
||||||
{
|
{
|
||||||
static char *url_like_pat[] = {
|
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:%\\-\\./=_\\+@#,\\$;]*",
|
"file:/[a-zA-Z0-9:%\\-\\./=_\\+@#,\\$;]*",
|
||||||
#ifdef USE_GOPHER
|
#ifdef USE_GOPHER
|
||||||
"gopher://[a-zA-Z0-9][a-zA-Z0-9:%\\-\\./_]*",
|
"gopher://[a-zA-Z0-9][a-zA-Z0-9:%\\-\\./_]*",
|
||||||
|
|||||||
@@ -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 "fm.h"
|
||||||
#include "regex.h"
|
#include "regex.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -158,9 +158,6 @@ forwardSearch(Buffer *buf, char *str)
|
|||||||
continue;
|
continue;
|
||||||
if (regexMatch(l->lineBuf, l->size, 1) == 1) {
|
if (regexMatch(l->lineBuf, l->size, 1) == 1) {
|
||||||
matchedPosition(&first, &last);
|
matchedPosition(&first, &last);
|
||||||
if (wrapped && l == begin && buf->pos == first - l->lineBuf)
|
|
||||||
/* exactly same match */
|
|
||||||
break;
|
|
||||||
pos = first - l->lineBuf;
|
pos = first - l->lineBuf;
|
||||||
while (pos >= l->len && l->next && l->next->bpos) {
|
while (pos >= l->len && l->next && l->next->bpos) {
|
||||||
pos -= l->len;
|
pos -= l->len;
|
||||||
@@ -268,13 +265,8 @@ backwardSearch(Buffer *buf, char *str)
|
|||||||
q = l->lineBuf;
|
q = l->lineBuf;
|
||||||
while (regexMatch(q, &l->lineBuf[l->size] - q, q == l->lineBuf) == 1) {
|
while (regexMatch(q, &l->lineBuf[l->size] - q, q == l->lineBuf) == 1) {
|
||||||
matchedPosition(&first, &last);
|
matchedPosition(&first, &last);
|
||||||
if (wrapped && l == begin && buf->pos == first - l->lineBuf)
|
found = first;
|
||||||
/* exactly same match */
|
found_last = last;
|
||||||
;
|
|
||||||
else {
|
|
||||||
found = first;
|
|
||||||
found_last = last;
|
|
||||||
}
|
|
||||||
if (q - l->lineBuf >= l->size)
|
if (q - l->lineBuf >= l->size)
|
||||||
break;
|
break;
|
||||||
#ifdef JP_CHARSET
|
#ifdef JP_CHARSET
|
||||||
|
|||||||
Reference in New Issue
Block a user