Mercurial > vim
comparison src/os_win32.c @ 16750:8050cde51945 v8.1.1377
patch 8.1.1377: MS-Windows GUI uses wrong shell command for bash
commit https://github.com/vim/vim/commit/fcc4d921d6761b833ae89ca3dc450c48c270ca36
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 24 13:32:36 2019 +0200
patch 8.1.1377: MS-Windows GUI uses wrong shell command for bash
Problem: MS-Windows GUI uses wrong shell command for bash. (Robert Bogomip)
Solution: Check that 'shellcmdflag' is "/c". (Ken Takata, closes https://github.com/vim/vim/issues/4418)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 24 May 2019 13:45:05 +0200 |
parents | e3feaa3e5f10 |
children | ef00b6bc186b |
comparison
equal
deleted
inserted
replaced
16749:dcdc2fd828be | 16750:8050cde51945 |
---|---|
4854 if ( | 4854 if ( |
4855 # ifdef VIMDLL | 4855 # ifdef VIMDLL |
4856 (gui.in_use || gui.starting) && | 4856 (gui.in_use || gui.starting) && |
4857 # endif | 4857 # endif |
4858 !s_dont_use_vimrun && p_stmp) | 4858 !s_dont_use_vimrun && p_stmp) |
4859 /* Use vimrun to execute the command. It opens a console | 4859 // Use vimrun to execute the command. It opens a console |
4860 * window, which can be closed without killing Vim. */ | 4860 // window, which can be closed without killing Vim. |
4861 vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s", | 4861 vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s", |
4862 vimrun_path, | 4862 vimrun_path, |
4863 (msg_silent != 0 || (options & SHELL_DOOUT)) | 4863 (msg_silent != 0 || (options & SHELL_DOOUT)) |
4864 ? "-s " : "", | 4864 ? "-s " : "", |
4865 p_sh, p_shcf, cmd); | 4865 p_sh, p_shcf, cmd); |
4866 else | 4866 else if ( |
4867 # ifdef VIMDLL | 4867 # ifdef VIMDLL |
4868 if (gui.in_use || gui.starting) | 4868 (gui.in_use || gui.starting) && |
4869 # endif | 4869 # endif |
4870 STRCMP(p_shcf, "/c") == 0) | |
4871 // workaround for the case that "vimrun" does not exist | |
4870 vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s", | 4872 vim_snprintf((char *)newcmd, cmdlen, "%s %s %s %s %s", |
4871 p_sh, p_shcf, p_sh, p_shcf, cmd); | 4873 p_sh, p_shcf, p_sh, p_shcf, cmd); |
4872 # ifdef VIMDLL | |
4873 else | 4874 else |
4874 # endif | 4875 #endif |
4875 #endif | |
4876 #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) | |
4877 vim_snprintf((char *)newcmd, cmdlen, "%s %s %s", | 4876 vim_snprintf((char *)newcmd, cmdlen, "%s %s %s", |
4878 p_sh, p_shcf, cmd); | 4877 p_sh, p_shcf, cmd); |
4879 #endif | |
4880 x = mch_system((char *)newcmd, options); | 4878 x = mch_system((char *)newcmd, options); |
4881 vim_free(newcmd); | 4879 vim_free(newcmd); |
4882 } | 4880 } |
4883 } | 4881 } |
4884 } | 4882 } |