Mercurial > vim
diff src/terminal.c @ 12798:5ae0d05e046a v8.0.1276
patch 8.0.1276: key lost when window closed in exit callback
commit https://github.com/vim/vim/commit/a3f7e58bf846b28b347a5d5b96c2d829871bd212
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 9 13:21:58 2017 +0100
patch 8.0.1276: key lost when window closed in exit callback
Problem: Typed key is lost when the terminal window is closed in exit
callback. (Gabriel Barta)
Solution: When the current window changes bail out of the wait loop. (closes
#2302)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 09 Nov 2017 13:30:05 +0100 |
parents | 4d9cdb1d8bea |
children | 8dfeed7e07e7 |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -38,8 +38,6 @@ * in tl_scrollback are no longer used. * * TODO: - * - Termdebug: issue #2154 might be avoided by adding -quiet to gdb? - * patch by Christian, 2017 Oct 23. * - in GUI vertical split causes problems. Cursor is flickering. (Hirohito * Higashi, 2017 Sep 19) * - double click in Window toolbar starts Visual mode (but not always?). @@ -1581,8 +1579,12 @@ terminal_loop(int blocking) c = term_vgetc(); if (!term_use_loop()) + { /* job finished while waiting for a character */ + if (c != K_IGNORE) + vungetc(c); break; + } if (c == K_IGNORE) continue;