To: vim_dev@googlegroups.com Subject: Patch 8.1.1295 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1295 Problem: When vimrun.exe does not exist external command may fail. Solution: Use "cmd /c" twice to get the same behavior. (Ken Takata, closes #4355) Files: src/os_win32.c *** ../vim-8.1.1294/src/os_win32.c 2019-04-28 22:50:36.157248454 +0200 --- src/os_win32.c 2019-05-07 22:56:33.355051443 +0200 *************** *** 4827,4837 **** } else { ! cmdlen = ( #ifdef FEAT_GUI_MSWIN ! (gui.in_use ? (!p_stmp ? 0 : STRLEN(vimrun_path)) : 0) + #endif ! STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10); newcmd = lalloc(cmdlen, TRUE); if (newcmd != NULL) --- 4827,4840 ---- } else { ! cmdlen = #ifdef FEAT_GUI_MSWIN ! (gui.in_use ? ! (!s_dont_use_vimrun && p_stmp ? ! STRLEN(vimrun_path) : STRLEN(p_sh) + STRLEN(p_shcf)) ! : 0) + #endif ! STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10; newcmd = lalloc(cmdlen, TRUE); if (newcmd != NULL) *************** *** 4869,4877 **** --- 4872,4890 ---- ? "-s " : "", p_sh, p_shcf, cmd); else + # ifdef VIMDLL + if (gui.in_use) + # endif + 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); } *** ../vim-8.1.1294/src/version.c 2019-05-07 22:52:46.688518695 +0200 --- src/version.c 2019-05-07 23:01:00.361412464 +0200 *************** *** 769,770 **** --- 769,772 ---- { /* Add new patch number below this line */ + /**/ + 1295, /**/ -- It is illegal to take more than three sips of beer at a time while standing. [real standing law in Texas, United States of America] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///