From 59ec44c6a49418e2179e6c6167e28f9e8e5bfa41 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 22 Jan 2002 10:45:14 +0000 Subject: [w3m-dev-en 00670] GOTO behavior change * main.c (goURL): default URL is current URL if retry_http specified, and inputed URL is not absolute URL add http:// to top of url * linein.c (InputKeymap): C-w as backword-kill-word From: Fumitoshi UKAI --- ChangeLog | 11 ++++++++++- linein.c | 4 ++-- main.c | 18 ++++++++++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66a4831..4d314e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-01-22 Fumitoshi UKAI + + * [w3m-dev-en 00670] GOTO behavior change + * main.c (goURL): default URL is current URL + if retry_http specified, and inputed URL is not absolute URL + add http:// to top of url + + * linein.c (InputKeymap): C-w as backword-kill-word + 2002-01-22 Fumitoshi UKAI * [w3m-dev 02880] URI_PATTERN @@ -2190,4 +2199,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.250 2002/01/22 06:53:10 ukai Exp $ +$Id: ChangeLog,v 1.251 2002/01/22 10:45:14 ukai Exp $ diff --git a/linein.c b/linein.c index 2dd56d4..a2c03d9 100644 --- a/linein.c +++ b/linein.c @@ -1,4 +1,4 @@ -/* $Id: linein.c,v 1.20 2002/01/16 19:05:36 ukai Exp $ */ +/* $Id: linein.c,v 1.21 2002/01/22 10:45:14 ukai Exp $ */ #include "fm.h" #include "local.h" #include "myctype.h" @@ -56,7 +56,7 @@ void (*InputKeymap[32]) () = { /* C-h C-i C-j C-k C-l C-m C-n C-o */ _bs, iself, _enter, killn, iself, _enter, _next, iself, /* C-p C-q C-r C-s C-t C-u C-v C-w */ - _prev, _quo, _bsw, iself, _mvLw, killb, _quo, iself, + _prev, _quo, _bsw, iself, _mvLw, killb, _quo, _bsw, /* C-x C-y C-z C-[ C-\ C-] C-^ C-_ */ _tcompl,_mvRw, iself, _esc, iself, iself, iself, iself, }; diff --git a/main.c b/main.c index a05cb99..e2a320f 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.67 2002/01/21 15:56:13 ukai Exp $ */ +/* $Id: main.c,v 1.68 2002/01/22 10:45:14 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -3619,11 +3619,21 @@ goURL(void) url = searchKeyData(); if (url == NULL) { + Str cur_url = parsedURL2Str(&Currentbuf->currentURL); + ParsedURL pu; if (!(Currentbuf->bufferprop & BP_INTERNAL)) - pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr); - url = inputLineHist("Goto URL: ", NULL, IN_URL, URLHist); - if (url != NULL) + pushHashHist(URLHist, cur_url->ptr); + url = inputLineHist("Goto URL: ", cur_url->ptr, IN_URL, URLHist); + if (url != NULL) { SKIP_BLANKS(url); + parseURL(url, &pu, NULL); + if (retryAsHttp) { + if ((pu.scheme == SCM_MISSING) + || ((pu.scheme == SCM_LOCAL) + && (strncmp(url, "file:", 5) != 0))) + url = Sprintf("http://%s", url)->ptr; + } + } } #ifdef JP_CHARSET if (url != NULL) { -- cgit v1.2.3