Problem: Mapping with CTRL keys does not work in the GUI.
Solution: Recognize CSI next to K_SPECIAL. (closes #11275, closes #11270)
d = res;
for (s = p; *s != NUL; )
{
- if (s[0] == K_SPECIAL && s[1] != NUL && s[2] != NUL)
+ if ((s[0] == K_SPECIAL
+#ifdef FEAT_GUI
+ || (gui.in_use && s[0] == CSI)
+#endif
+ ) && s[1] != NUL && s[2] != NUL)
{
// Copy special key unmodified.
*d++ = *s++;
bw!
endfunc
+func Test_gui_macro_csi()
+ " Test for issue #11270
+ nnoremap <C-L> <Cmd>let g:triggered = 1<CR>
+ let @q = "\x9b\xfc\x04L"
+ norm @q
+ call assert_equal(1, g:triggered)
+ unlet g:triggered
+ nunmap <C-L>
+
+ " Test for issue #11057
+ inoremap <C-D>t bbb
+ call setline(1, "\t")
+ let @q = "i\x9b\xfc\x04D"
+ " The end of :normal is like a mapping timing out
+ norm @q
+ call assert_equal('', getline(1))
+ iunmap <C-D>t
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 660,
/**/
659,
/**/