]> granicus.if.org Git - vim/commitdiff
patch 8.1.1377: MS-Windows GUI uses wrong shell command for bash v8.1.1377
authorBram Moolenaar <Bram@vim.org>
Fri, 24 May 2019 11:32:36 +0000 (13:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 24 May 2019 11:32:36 +0000 (13:32 +0200)
Problem:    MS-Windows GUI uses wrong shell command for bash. (Robert Bogomip)
Solution:   Check that 'shellcmdflag' is "/c". (Ken Takata, closes #4418)

src/os_win32.c
src/version.c

index 33d48cf7fa7a95e50714b595a7b44709a6f542a4..237de979e6e7ca3471fdd56714d898791e3b79a0 100644 (file)
@@ -4856,27 +4856,25 @@ mch_call_shell(
                    (gui.in_use || gui.starting) &&
 # endif
                    !s_dont_use_vimrun && p_stmp)
-                   /* Use vimrun to execute the command.  It opens a console
-                    * window, which can be closed without killing Vim. */
+                   // Use vimrun to execute the command.  It opens a console
+                   // window, which can be closed without killing Vim.
                    vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s",
                            vimrun_path,
                            (msg_silent != 0 || (options & SHELL_DOOUT))
                                                                 ? "-s " : "",
                            p_sh, p_shcf, cmd);
-               else
+               else if (
 # ifdef VIMDLL
-               if (gui.in_use || gui.starting)
+                       (gui.in_use || gui.starting) &&
 # endif
+                       STRCMP(p_shcf, "/c") == 0)
+                   // workaround for the case that "vimrun" does not exist
                    vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s",
                                           p_sh, p_shcf, p_sh, p_shcf, cmd);
-# ifdef VIMDLL
                else
-# endif
 #endif
-#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
                    vim_snprintf((char *)newcmd, cmdlen, "%s %s %s",
                                                           p_sh, p_shcf, cmd);
-#endif
                x = mch_system((char *)newcmd, options);
                vim_free(newcmd);
            }
index 26c407195c3e1a164d42503bc0e8a0c82eeb1d02..b2278ed02ac4eec7e52f4814f14203f8d7b5cdf5 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1377,
 /**/
     1376,
 /**/