]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1379: MS-Windows: error when running evim when space in path v9.1.1379
authorGuyBrush <miguel.barro@live.com>
Sat, 10 May 2025 18:44:33 +0000 (20:44 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 10 May 2025 18:44:33 +0000 (20:44 +0200)
commitcf488ebf6c87d8abc1e2b09885d3767511db87a3
tree6034360984ea4610a5b2a77987dd1bf78cc831a8
parent1b186833c1cabeb4da3c855596b9161ff982bcfc
patch 9.1.1379: MS-Windows: error when running evim when space in path

Problem:  MS-Windows: error when running evim when space in path of Vim
Solution: properly parse quoted strings (Miguel Barro)

When vim is installed in a path with whitespaces (like
`C:\Program Files (x86)\Vim\vim91\vim.exe`). Launching `evim` or
`vim -d` will try to open the file ` (x86)\Vim\vim91\vim.exe`.

Modern versions of vim simplify shell operation by parsing its own
command line. For example on Linux all vim flavours like `evim`, `rvim`,
etc are symlinks to vim. Then vim uses the `parse_command_name()`
function to identify which version of vim it should launch.
For `evim` if a GUI is available `gvim` is launched for better user
experience. In order to launch `gvim` the original command line is
parsed to be passed *verbatim* to the new instance.
This parsing did not properly handle quoted command lines with
whitespaces such as
```
"C:\Program Files (x86)\Vim\vim91\vim.exe" -y myfile.txt
```

closes: #17295

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui_w32.c
src/version.c