comparison src/edit.c @ 26598:b3ac5a4dc158 v8.2.3828

patch 8.2.3828: when opening a terminal from a timer first typed char is lost Commit: https://github.com/vim/vim/commit/8103527da7f12ff21c2566222748518ee093432c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 16 18:02:07 2021 +0000 patch 8.2.3828: when opening a terminal from a timer first typed char is lost Problem: when opening a terminal from a timer the first typed character is lost. (Virginia Senioria) Solution: When opening a terminal while waiting for a character put K_IGNORE in the input buffer.
author Bram Moolenaar <Bram@vim.org>
date Thu, 16 Dec 2021 19:15:04 +0100
parents 9596c652420b
children fc859aea8cec
comparison
equal deleted inserted replaced
26597:0a31a23836de 26598:b3ac5a4dc158
596 else 596 else
597 do 597 do
598 { 598 {
599 c = safe_vgetc(); 599 c = safe_vgetc();
600 600
601 if (stop_insert_mode) 601 if (stop_insert_mode
602 #ifdef FEAT_TERMINAL
603 || (c == K_IGNORE && term_use_loop())
604 #endif
605 )
602 { 606 {
603 // Insert mode ended, possibly from a callback. 607 // Insert mode ended, possibly from a callback, or a timer
608 // must have opened a terminal window.
604 if (c != K_IGNORE && c != K_NOP) 609 if (c != K_IGNORE && c != K_NOP)
605 vungetc(c); 610 vungetc(c);
606 count = 0; 611 count = 0;
607 nomove = TRUE; 612 nomove = TRUE;
608 ins_compl_prep(ESC); 613 ins_compl_prep(ESC);