w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 5af215ef85394e6b1d3e2bd243b87943e249ae75
parent befa76628d514e7b51be458a29e9489e81d3af77
Author: ukai <ukai>
Date:   Tue, 22 Jan 2002 10:45:14 +0000

[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:
MChangeLog | 9+++++++++
Mlinein.c | 2+-
Mmain.c | 16+++++++++++++---
3 files changed, 23 insertions(+), 4 deletions(-)

diff --git 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 diff --git a/linein.c b/linein.c @@ -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 @@ -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) {