[w3m-dev-en 00752] Re: tab completion weirdness in w3m 0.3

* file.c (doFileCopy): same fix as [w3m-dev-en 00751]
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-06-09 16:11:33 +00:00
parent 1756f4887e
commit a81a104780
2 changed files with 15 additions and 6 deletions
+6 -1
View File
@@ -1,3 +1,8 @@
2002-06-10 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
* [w3m-dev-en 00752] Re: tab completion weirdness in w3m 0.3
* file.c (doFileCopy): same fix as [w3m-dev-en 00751]
2002-06-10 Kiyokazu SUTO <suto@ks-and-ks.ne.jp> 2002-06-10 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
* [w3m-dev-en 00751] Re: tab completion weirdness in w3m 0.3 * [w3m-dev-en 00751] Re: tab completion weirdness in w3m 0.3
@@ -3488,4 +3493,4 @@
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.387 2002/06/09 16:09:24 ukai Exp $ $Id: ChangeLog,v 1.388 2002/06/09 16:11:33 ukai Exp $
+9 -5
View File
@@ -1,4 +1,4 @@
/* $Id: file.c,v 1.91 2002/05/14 15:31:49 ukai Exp $ */ /* $Id: file.c,v 1.92 2002/06/09 16:11:33 ukai Exp $ */
#include "fm.h" #include "fm.h"
#include <sys/types.h> #include <sys/types.h>
#include "myctype.h" #include "myctype.h"
@@ -7112,18 +7112,22 @@ doFileCopy(char *tmpf, char *defstr)
{ {
Str msg; Str msg;
Str filen; Str filen;
char *p, *q; char *p, *q = NULL;
if (fmInitialized) { if (fmInitialized) {
p = searchKeyData(); p = searchKeyData();
if (p == NULL || *p == '\0') { if (p == NULL || *p == '\0') {
p = inputLineHist("(Download)Save file to: ", q = inputLineHist("(Download)Save file to: ",
defstr, IN_COMMAND, SaveHist); defstr, IN_COMMAND, SaveHist);
if (p == NULL || *p == '\0') if (q == NULL || *q == '\0')
return; return;
p = conv_to_system(p); p = conv_to_system(q);
} }
if (*p != '|' || !PermitSaveToPipe) { if (*p != '|' || !PermitSaveToPipe) {
if (q) {
p = unescape_spaces(Strnew_charp(q))->ptr;
p = conv_to_system(q);
}
p = expandName(p); p = expandName(p);
if (checkOverWrite(p) < 0) if (checkOverWrite(p) < 0)
return; return;