aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-22 10:45:14 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-22 10:45:14 +0000
commit59ec44c6a49418e2179e6c6167e28f9e8e5bfa41 (patch)
tree1f1f69dc88744bf6050e0e874dd4046f84acf7be
parent[w3m-dev 02880] URI_PATTERN (diff)
downloadw3m-59ec44c6a49418e2179e6c6167e28f9e8e5bfa41.tar.gz
w3m-59ec44c6a49418e2179e6c6167e28f9e8e5bfa41.zip
[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 <ukai@debian.or.jp>
-rw-r--r--ChangeLog11
-rw-r--r--linein.c4
-rw-r--r--main.c18
3 files changed, 26 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 66a4831..4d314e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2002-01-22 Fumitoshi UKAI <ukai@debian.or.jp>
+ * [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 <ukai@debian.or.jp>
+
* [w3m-dev 02880] URI_PATTERN
* url.c (URI_PATTERN): better match for % hex hex
* url.c (chkExternalURIBuffer): don't use URI_PATTERN as format string
@@ -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 <signal.h>
@@ -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) {