From 1eee089039ec08bfb38cd4607aa355b37926860a Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Tue, 1 Feb 2011 20:19:15 +0100 Subject: [PATCH] Force flush output before running shell command Shell commands may take a long time to finish (without drawing anything) so force a flush before executing any shell command. --- src/os_unix.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/os_unix.c b/src/os_unix.c index 4db67fd21f..907f5ab12e 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3725,6 +3725,12 @@ mch_call_shell(cmd, options) # endif out_flush(); +#ifdef FEAT_GUI_MACVIM + /* It is conceivable that the shell command will take a long time to finish + * so force a flush now. */ + if (gui.in_use) + gui_macvim_force_flush(); +#endif if (options & SHELL_COOKED) settmode(TMODE_COOK); /* set to normal mode */ @@ -3846,6 +3852,12 @@ mch_call_shell(cmd, options) goto error; out_flush(); +#ifdef FEAT_GUI_MACVIM + /* It is conceivable that the shell command will take a long time to finish + * so force a flush now. */ + if (gui.in_use) + gui_macvim_force_flush(); +#endif if (options & SHELL_COOKED) settmode(TMODE_COOK); /* set to normal mode */