]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.944 v7.3.944
authorBram Moolenaar <Bram@vim.org>
Mon, 13 May 2013 18:26:53 +0000 (20:26 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 13 May 2013 18:26:53 +0000 (20:26 +0200)
Problem:    External program receives the termrespone.
Solution:   Insert a delay and discard input. (Hayaki Saito)

src/term.c
src/version.c

index 87e2e8b01c222dc4efe0b1e15223938de1719507..97bf62ac42346b4d94c1829c5583ab2d63d41e8c 100644 (file)
@@ -3253,9 +3253,19 @@ stoptermcap()
        if (!gui.in_use && !gui.starting)
 # endif
        {
-           /* May need to check for T_CRV response. */
+           /* May need to discard T_CRV or T_U7 response. */
            if (crv_status == CRV_SENT || u7_status == U7_SENT)
-               (void)vpeekc_nomap();
+           {
+# ifdef UNIX
+               /* Give the terminal a chance to respond. */
+               mch_delay(100L, FALSE);
+# endif
+# ifdef TCIFLUSH
+               /* Discard data received but not read. */
+               if (exiting)
+                   tcflush(fileno(stdin), TCIFLUSH);
+# endif
+           }
            /* Check for termcodes first, otherwise an external program may
             * get them. */
            check_for_codes_from_term();
index 63476f7bc1f0bfbcf075112c039c028c6442730b..264d369e1ae86f8ad6f3f1060eba845f1ecb7029 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    944,
 /**/
     943,
 /**/