diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-06-09 16:11:33 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-06-09 16:11:33 +0000 |
commit | a81a10478080f40f320f8926fe65379cc016c38d (patch) | |
tree | 6b3d15a69dfae1864543378c837d363a83697186 /file.c | |
parent | [w3m-dev-en 00751] Re: tab completion weirdness in w3m 0.3 (diff) | |
download | w3m-a81a10478080f40f320f8926fe65379cc016c38d.tar.gz w3m-a81a10478080f40f320f8926fe65379cc016c38d.zip |
[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>
Diffstat (limited to '')
-rw-r--r-- | file.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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 <sys/types.h> #include "myctype.h" @@ -7112,18 +7112,22 @@ doFileCopy(char *tmpf, char *defstr) { Str msg; Str filen; - char *p, *q; + char *p, *q = NULL; if (fmInitialized) { p = searchKeyData(); if (p == NULL || *p == '\0') { - p = inputLineHist("(Download)Save file to: ", + q = inputLineHist("(Download)Save file to: ", defstr, IN_COMMAND, SaveHist); - if (p == NULL || *p == '\0') + if (q == NULL || *q == '\0') return; - p = conv_to_system(p); + p = conv_to_system(q); } if (*p != '|' || !PermitSaveToPipe) { + if (q) { + p = unescape_spaces(Strnew_charp(q))->ptr; + p = conv_to_system(q); + } p = expandName(p); if (checkOverWrite(p) < 0) return; |