From a81a10478080f40f320f8926fe65379cc016c38d Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Sun, 9 Jun 2002 16:11:33 +0000 Subject: [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 --- ChangeLog | 7 ++++++- file.c | 14 +++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4695b7d..56b3a27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-10 Kiyokazu SUTO + + * [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 * [w3m-dev-en 00751] Re: tab completion weirdness in w3m 0.3 @@ -3488,4 +3493,4 @@ * release-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 $ diff --git a/file.c b/file.c index 6beb3b6..24b4fea 100644 --- a/file.c +++ b/file.c @@ -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 #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; -- cgit v1.2.3