mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
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>
This commit is contained in:
committed by
Christian Brabandt
parent
1b186833c1
commit
cf488ebf6c
@@ -5384,12 +5384,10 @@ gui_mch_do_spawn(char_u *arg)
|
|||||||
{
|
{
|
||||||
if (*p == L'"')
|
if (*p == L'"')
|
||||||
{
|
{
|
||||||
while (*p && *p != L'"')
|
// Skip quoted strings
|
||||||
++p;
|
while (*++p && *p != L'"');
|
||||||
if (*p)
|
|
||||||
++p;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
cmd = p;
|
cmd = p;
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1379,
|
||||||
/**/
|
/**/
|
||||||
1378,
|
1378,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user