diff options
author | Kurt Bonatz <Kurt-Bonatz@users.noreply.github.com> | 2017-02-15 02:12:31 -0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-02-15 11:12:31 +0100 |
commit | 0e44916fff882de6db6f0e98438e8db04293471e (patch) | |
tree | 22103e44d36cb0d3c58111a3dffb21a7ca6396bc /src | |
parent | 64c375c589437b811027c5602ecd3969edc162cb (diff) | |
download | rneovim-0e44916fff882de6db6f0e98438e8db04293471e.tar.gz rneovim-0e44916fff882de6db6f0e98438e8db04293471e.tar.bz2 rneovim-0e44916fff882de6db6f0e98438e8db04293471e.zip |
ex_docmd.c: Allow unescaped spaces in :edit filename (#6119)
This makes :edit consistent on all platforms.
Also affects :argedit, et al. Wild (tab) completion doesn't work, though.
Closes #6010
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index c5625d7882..1ae5038325 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -3940,8 +3940,6 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp) * Don't do this for: * - replacement that already has been escaped: "##" * - shell commands (may have to use quotes instead). - * - non-unix systems when there is a single argument (spaces don't - * separate arguments then). */ if (!eap->usefilter && !escaped @@ -3952,9 +3950,7 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp) && eap->cmdidx != CMD_lgrep && eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd -#ifndef UNIX && !(eap->argt & NOSPC) -#endif ) { char_u *l; #ifdef BACKSLASH_IN_FILENAME @@ -4016,28 +4012,6 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp) } } - // Replace any other wildcards, remove backslashes. -#ifdef UNIX - /* - * Only for Unix we check for more than one file name. - * For other systems spaces are considered to be part - * of the file name. - * Only check here if there is no wildcard, otherwise - * ExpandOne() will check for errors. This allows - * ":e `ls ve*.c`" on Unix. - */ - if (!has_wildcards) - for (p = eap->arg; *p; ++p) { - /* skip escaped characters */ - if (p[1] && (*p == '\\' || *p == Ctrl_V)) - ++p; - else if (ascii_iswhite(*p)) { - *errormsgp = (char_u *)_("E172: Only one file name allowed"); - return FAIL; - } - } -#endif - /* * Halve the number of backslashes (this is Vi compatible). * For Unix, when wildcards are expanded, this is |