diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-13 20:26:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-13 20:26:53 +0200 |
commit | 29607acff640183682cd4ecb6c65985a7897bd51 (patch) | |
tree | f23ed95bc5466532350316ee41c132e5d0927764 /src/term.c | |
parent | bd80f35bc59442894a4ec56aefb0137cb0a350fa (diff) | |
download | vim-git-29607acff640183682cd4ecb6c65985a7897bd51.tar.gz |
updated for version 7.3.944v7.3.944
Problem: External program receives the termrespone.
Solution: Insert a delay and discard input. (Hayaki Saito)
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index 87e2e8b01..97bf62ac4 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(); |