]> granicus.if.org Git - vim/commitdiff
patch 9.0.0100: get hit-enter prompt for system() when '!' is in 'guioptions' v9.0.0100
authorBram Moolenaar <Bram@vim.org>
Thu, 28 Jul 2022 11:54:08 +0000 (12:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 28 Jul 2022 11:54:08 +0000 (12:54 +0100)
Problem:    Get hit-enter prompt for system() when '!' is in 'guioptions'.
Solution:   Do not call wait_return() when not redrawing. (closes #3327)

src/os_unix.c
src/version.c

index 18c766d246b3066512a9d8eca75ce20d7909fe90..07762f4c112a5ccbcbea94aa26e30011e9e6bfe1 100644 (file)
@@ -4522,7 +4522,10 @@ mch_call_shell_terminal(
     // restore curwin/curbuf and a few other things
     aucmd_restbuf(&aco);
 
-    wait_return(TRUE);
+    // only require pressing Enter when redrawing, to avoid that system() gets
+    // the hit-enter prompt even though it didn't output anything.
+    if (!RedrawingDisabled)
+       wait_return(TRUE);
     do_buffer(DOBUF_WIPE, DOBUF_FIRST, FORWARD, buf->b_fnum, TRUE);
 
 theend:
index c0a0315a9a317932721f83b9e48e0dbd1b437f42..9e682a5fd6357187d70494d00e6bb78283373c8b 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    100,
 /**/
     99,
 /**/