aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
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 /main.c
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>
Diffstat (limited to '')
-rw-r--r--main.c18
1 files changed, 14 insertions, 4 deletions
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) {