mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -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:
parent
185d68a9d0
commit
a4b2699e28
@ -2372,8 +2372,13 @@ terminal_loop(int blocking)
|
|||||||
}
|
}
|
||||||
else if (termwinkey == 0 || c != termwinkey)
|
else if (termwinkey == 0 || c != termwinkey)
|
||||||
{
|
{
|
||||||
stuffcharReadbuff(Ctrl_W);
|
char_u buf[MB_MAXBYTES + 2];
|
||||||
stuffcharReadbuff(c);
|
|
||||||
|
// 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;
|
ret = OK;
|
||||||
goto theend;
|
goto theend;
|
||||||
}
|
}
|
||||||
|
@ -1686,6 +1686,13 @@ func Test_terminal_termwinkey()
|
|||||||
call feedkeys("\<C-W>w", 'tx')
|
call feedkeys("\<C-W>w", 'tx')
|
||||||
call assert_equal(termwin, win_getid())
|
call assert_equal(termwin, win_getid())
|
||||||
|
|
||||||
|
set langmap=xjyk
|
||||||
|
call feedkeys("\<C-L>x", 'tx')
|
||||||
|
call assert_equal(thiswin, win_getid())
|
||||||
|
call feedkeys("\<C-W>y", 'tx')
|
||||||
|
call assert_equal(termwin, win_getid())
|
||||||
|
set langmap=
|
||||||
|
|
||||||
call feedkeys("\<C-L>gt", "xt")
|
call feedkeys("\<C-L>gt", "xt")
|
||||||
call assert_equal(3, tabpagenr())
|
call assert_equal(3, tabpagenr())
|
||||||
tabprev
|
tabprev
|
||||||
|
@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1848,
|
||||||
/**/
|
/**/
|
||||||
1847,
|
1847,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user