summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-05-13 20:26:53 +0200
committerBram Moolenaar <bram@vim.org>2013-05-13 20:26:53 +0200
commit5e290a3a26993bc71d96e6f1a5fa196c73896981 (patch)
tree513139055ca621b3b5c64dfcf742d6e66b51ebec
parent54eca37519d03d2c2f94bccf793f0feb95c78d1a (diff)
downloadvim-5e290a3a26993bc71d96e6f1a5fa196c73896981.tar.gz
updated for version 7.3.944v7.3.944v7-3-944
Problem: External program receives the termrespone. Solution: Insert a delay and discard input. (Hayaki Saito)
-rw-r--r--src/term.c14
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index 87e2e8b0..97bf62ac 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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();
diff --git a/src/version.c b/src/version.c
index 63476f7b..264d369e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 944,
+/**/
943,
/**/
942,