diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-15 20:58:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-15 20:58:54 +0200 |
commit | a4b2699e28a30dcc4d1696b317f24a8904ec2a06 (patch) | |
tree | 1fdfacb6d7b165248e0fefdc73304b4be43eb833 /src/terminal.c | |
parent | 185d68a9d08f18440af93dd0f232e38f1819ddb2 (diff) | |
download | vim-git-a4b2699e28a30dcc4d1696b317f24a8904ec2a06.tar.gz |
patch 8.1.1848: 'langmap' is not used for CTRL-W command in terminalv8.1.1848
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)
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/terminal.c b/src/terminal.c index 51e242f19..95347a16c 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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; } |