0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1848: 'langmap' is not used for CTRL-W command in terminal

Problem:    'langmap' is not used for CTRL-W command in terminal.
Solution:   Push the command in the typeahead buffer instead of the stuff
            buffer. (closes #4814)
This commit is contained in:
Bram Moolenaar
2019-08-15 20:58:54 +02:00
parent 185d68a9d0
commit a4b2699e28
3 changed files with 16 additions and 2 deletions

View File

@@ -2372,8 +2372,13 @@ terminal_loop(int blocking)
}
else if (termwinkey == 0 || c != termwinkey)
{
stuffcharReadbuff(Ctrl_W);
stuffcharReadbuff(c);
char_u buf[MB_MAXBYTES + 2];
// Put the command into the typeahead buffer, when using the
// stuff buffer KeyStuffed is set and 'langmap' won't be used.
buf[0] = Ctrl_W;
buf[(*mb_char2bytes)(c, buf + 1) + 1] = NUL;
ins_typebuf(buf, REMAP_NONE, 0, TRUE, FALSE);
ret = OK;
goto theend;
}