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)
void
parse_queued_messages(void)
{
+ win_T *old_curwin = curwin;
+
/* For Win32 mch_breakcheck() does not check for input, do it here. */
# if defined(WIN32) && defined(FEAT_JOB_CHANNEL)
channel_handle_events(FALSE);
/* Check if any jobs have ended. */
job_check_ended();
# endif
+
+ /* If the current window changed we need to bail out of the waiting loop.
+ * E.g. when a job exit callback closes the terminal window. */
+ if (curwin != old_curwin)
+ ins_char_typebuf(K_IGNORE);
}
#endif
* 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?).
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;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1276,
/**/
1275,
/**/