File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3251,7 +3251,11 @@ call_shell(char_u *cmd, int opt)
32513251 /* The external command may update a tags file, clear cached tags. */
32523252 tag_freematch ();
32533253
3254- if (cmd == NULL || * p_sxq == NUL )
3254+ if (cmd == NULL || * p_sxq == NUL
3255+ #if defined(FEAT_GUI_MSWIN ) && defined(FEAT_TERMINAL )
3256+ || vim_strchr (p_go , GO_TERMINAL ) != NULL
3257+ #endif
3258+ )
32553259 retval = mch_call_shell (cmd , opt );
32563260 else
32573261 {
Original file line number Diff line number Diff line change @@ -4640,20 +4640,30 @@ mch_call_shell(
46404640 }
46414641#endif
46424642#if defined(FEAT_GUI ) && defined(FEAT_TERMINAL )
4643- /* TODO: make the terminal window work with input or output redirected. */
4643+ // TODO: make the terminal window work with input or output redirected.
46444644 if (
46454645# ifdef VIMDLL
4646- gui .in_use &&
4646+ gui .in_use &&
46474647# endif
4648- vim_strchr (p_go , GO_TERMINAL ) != NULL
4648+ vim_strchr (p_go , GO_TERMINAL ) != NULL
46494649 && (options & (SHELL_FILTER |SHELL_DOOUT |SHELL_WRITE |SHELL_READ )) == 0 )
46504650 {
4651- /* Use a terminal window to run the command in. */
4652- x = mch_call_shell_terminal (cmd , options );
4651+ char_u * cmdbase = cmd ;
4652+
4653+ // Skip a leading quote and (.
4654+ while (* cmdbase == '"' || * cmdbase == '(' )
4655+ ++ cmdbase ;
4656+
4657+ // Check the command does not begin with "start "
4658+ if (STRNICMP (cmdbase , "start" , 5 ) != 0 || !VIM_ISWHITE (cmdbase [5 ]))
4659+ {
4660+ // Use a terminal window to run the command in.
4661+ x = mch_call_shell_terminal (cmd , options );
46534662# ifdef FEAT_TITLE
4654- resettitle ();
4663+ resettitle ();
46554664# endif
4656- return x ;
4665+ return x ;
4666+ }
46574667 }
46584668#endif
46594669
Original file line number Diff line number Diff line change @@ -767,6 +767,8 @@ static char *(features[]) =
767767
768768static int included_patches [] =
769769{ /* Add new patch number below this line */
770+ /**/
771+ 1492 ,
770772/**/
771773 1491 ,
772774/**/
You can’t perform that action at this time.
0 commit comments