Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: If file name on command line starts with space, preceding backslash is lost #371

Open
GoogleCodeExporter opened this issue Aug 21, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a file named " testfile.txt" (leading space).
2. Start Vim and pass the file name on the command line, including at least one
   parent directory (i.e. gvim.exe "test\ testfile.txt")

What is the expected output? What do you see instead?
I would expect Vim to open the file. Instead, it swallows the backslash before 
the space and opens "test testfile.txt" as a new file.


What version of the product are you using? On what operating system?
7.4.711 (Cream vanilla), Windows 8.1


Please provide any additional information below.
The same effect occurs when using the shell context menu. The bug is in Vim, 
see below:

C:\test>py -3 -c "import sys; print(str(sys.argv))" "test\ testfile.txt"
['-c', 'test\\ testfile.txt']

Python does not lose the backslash.

Original issue reported on code.google.com by ch...@chrullrich.net on 11 Jun 2015 at 8:35

@GoogleCodeExporter
Copy link
Author

Same behavior with 7.4.729 (tuxproject.de).

Original comment by ch...@chrullrich.net on 11 Jun 2015 at 9:11

@GoogleCodeExporter
Copy link
Author

works with gvim "test/\ testfile.txt"

Original comment by chrisbr...@googlemail.com on 11 Jun 2015 at 9:55

@GoogleCodeExporter
Copy link
Author

Looks like a decent workaround...but it shouldn't be needed, since Vim 
supposedly has Windows support and Windows mostly uses \ for native path 
separator.

Original comment by fritzoph...@gmail.com on 11 Jun 2015 at 2:38

@GoogleCodeExporter
Copy link
Author

It's not a workaround, decent or not. I don't think it was meant as one, either.

The main impact of this bug is that it breaks opening files from the shell 
context menu, because you can't influence the path that Explorer passes to Vim 
in that case.

With tab completion in a command prompt window, it is nearly as bad, but at 
least there I could fix up the path to make Vim understand it before I run it.

Original comment by ch...@chrullrich.net on 11 Jun 2015 at 2:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant