diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-04-28 19:46:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-04-28 19:46:49 +0200 |
commit | afde13b62b8fa25dac4635d5caee8d088b937ee0 (patch) | |
tree | 6a8b58aa58e180e55b2948e5d0bfdbc3d4692a49 /src/ex_cmds.c | |
parent | ab4cece6053b0bfd604e15065227b94af873608b (diff) |
patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exev8.1.1230
Problem: A lot of code is shared between vim.exe and gvim.exe.
Solution: Optionally put the shared code in vim.dll. (Ken Takata,
closes #4287)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 0ab5df6c0f..8766c66707 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1537,7 +1537,7 @@ do_shell( int flags) /* may be SHELL_DOOUT when output is redirected */ { buf_T *buf; -#ifndef FEAT_GUI_MSWIN +#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) int save_nwr; #endif #ifdef MSWIN @@ -1636,32 +1636,37 @@ do_shell( * Otherwise there is probably text on the screen that the user wants * to read before redrawing, so call wait_return(). */ -#ifndef FEAT_GUI_MSWIN - if (cmd == NULL -# ifdef MSWIN - || (keep_termcap && !need_wait_return) +#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) +# ifdef VIMDLL + if (!gui.in_use) # endif - ) { - if (msg_silent == 0) - redraw_later_clear(); - need_wait_return = FALSE; - } - else - { - /* - * If we switch screens when starttermcap() is called, we really - * want to wait for "hit return to continue". - */ - save_nwr = no_wait_return; - if (swapping_screen()) - no_wait_return = FALSE; + if (cmd == NULL +# ifdef MSWIN + || (keep_termcap && !need_wait_return) +# endif + ) + { + if (msg_silent == 0) + redraw_later_clear(); + need_wait_return = FALSE; + } + else + { + /* + * If we switch screens when starttermcap() is called, we + * really want to wait for "hit return to continue". + */ + save_nwr = no_wait_return; + if (swapping_screen()) + no_wait_return = FALSE; # ifdef AMIGA - wait_return(term_console ? -1 : msg_silent == 0); /* see below */ + wait_return(term_console ? -1 : msg_silent == 0); // see below # else - wait_return(msg_silent == 0); + wait_return(msg_silent == 0); # endif - no_wait_return = save_nwr; + no_wait_return = save_nwr; + } } #endif /* FEAT_GUI_MSWIN */ |