patch 9.1.1379: MS-Windows: error when running evim when space in path

Commit: 
https://github.com/vim/vim/commit/cf488ebf6c87d8abc1e2b09885d3767511db87a3
Author: GuyBrush <miguel.ba...@live.com>
Date:   Sat May 10 20:44:33 2025 +0200

    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 im91 im.exe`). Launching `evim` or
    `vim -d` will try to open the file ` (x86)\Vim im91 im.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 im91 im.exe" -y myfile.txt
    ```
    
    closes: #17295
    
    Signed-off-by: Miguel Barro <miguel.ba...@live.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/gui_w32.c b/src/gui_w32.c
index 400169a59..a29fa91b0 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -5384,13 +5384,11 @@ gui_mch_do_spawn(char_u *arg)
        {
            if (*p == L'"')
            {
-               while (*p && *p != L'"')
-                   ++p;
-               if (*p)
-                   ++p;
+               // Skip quoted strings
+               while (*++p && *p != L'"');
            }
-           else
-               ++p;
+
+           ++p;
        }
        cmd = p;
     }
diff --git a/src/version.c b/src/version.c
index c84709e50..b0dc43887 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1379,
 /**/
     1378,
 /**/

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1uDpQZ-002TQc-QN%40256bit.org.

Raspunde prin e-mail lui