James McCoy wrote:
> On Jan 19, 2016 7:51 AM, "Bram Moolenaar" <[email protected]> wrote:
> >
> >
> > Patch 7.4.1134
> > Problem: The arglist test fails on MS-Windows.
> > Solution: Only check for failure of argedit on Unix.
> > Files: src/testdir/test_arglist.vim
> >
> >
> > *** ../vim-7.4.1133/src/testdir/test_arglist.vim 2016-01-19
> 13:07:08.754882644 +0100
> > --- src/testdir/test_arglist.vim 2016-01-19 13:47:05.521073438
> +0100
> > ***************
> > *** 226,232 ****
> > argedit a
> > call assert_equal(['a', 'b'], argv())
> > call assert_equal('a', expand('%:t'))
> > ! call assert_fails('argedit a b', 'E172:')
> > argedit c
> > call assert_equal(['a', 'c', 'b'], argv())
> > 0argedit x
> > --- 226,235 ----
> > argedit a
> > call assert_equal(['a', 'b'], argv())
> > call assert_equal('a', expand('%:t'))
> > ! if has('unix')
> > ! " on MS-Windows this would edit file "a b"
>
> Why does the behavior differ? Shouldn't it be consistent?
>
> Both Windows and UNIX asked you to have a file with a space in the name.
> In fact, :argedit's help calls out that only one filename is allowed.
Yeah, this has a long history. On Unix:
:edit a b
Gives an error. On MS-Windows you edit the file "a b".
This is explained above ":he wildcard".
We can't change it on MS-Windows without breaking things.
Could we change this on Unix? Currently it's an error, so one might
think it would not cause a problem. It's as simple as removing the check
for SPACE_IN_FILENAME. Although there is some other code when searching
for NOSPC.
The main problem will be trying to use ":edit one.c two.c", expecting to
edit two files. Now you get an error, after the change you just edit a
file with a weird name.
--
A)bort, R)etry, B)ang it with a large hammer
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.