mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.1786: no test for 'termwinkey'
Problem: No test for 'termwinkey'. Solution: Add a test. Make feedkeys() handle terminal_loop() returning before characters are consumed.
This commit is contained in:
@@ -2059,7 +2059,7 @@ vgetorpeek(int advance)
|
||||
c = inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 0L);
|
||||
/*
|
||||
* If inchar() returns TRUE (script file was active) or we
|
||||
* are inside a mapping, get out of insert mode.
|
||||
* are inside a mapping, get out of Insert mode.
|
||||
* Otherwise we behave like having gotten a CTRL-C.
|
||||
* As a result typing CTRL-C in insert mode will
|
||||
* really insert a CTRL-C.
|
||||
@@ -2755,6 +2755,10 @@ vgetorpeek(int advance)
|
||||
* cmdline window. */
|
||||
if (p_im && (State & INSERT))
|
||||
c = Ctrl_L;
|
||||
#ifdef FEAT_TERMINAL
|
||||
else if (terminal_is_active())
|
||||
c = K_CANCEL;
|
||||
#endif
|
||||
else if ((State & CMDLINE)
|
||||
#ifdef FEAT_CMDWIN
|
||||
|| (cmdwin_type > 0 && tc == ESC)
|
||||
@@ -2898,8 +2902,8 @@ vgetorpeek(int advance)
|
||||
} /* for (;;) */
|
||||
} /* if (!character from stuffbuf) */
|
||||
|
||||
/* if advance is FALSE don't loop on NULs */
|
||||
} while (c < 0 || (advance && c == NUL));
|
||||
/* if advance is FALSE don't loop on NULs */
|
||||
} while ((c < 0 && c != K_CANCEL) || (advance && c == NUL));
|
||||
|
||||
/*
|
||||
* The "INSERT" message is taken care of here:
|
||||
|
Reference in New Issue
Block a user