mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
Merge pull request #18309 from zeertzjq/vim-8.2.4845
vim-patch:8.2.{4844,4845,4846}
This commit is contained in:
commit
7df25a1372
@ -187,22 +187,17 @@ void get_mode(char *buf)
|
||||
if (State & VREPLACE_FLAG) {
|
||||
buf[i++] = 'R';
|
||||
buf[i++] = 'v';
|
||||
if (ins_compl_active()) {
|
||||
buf[i++] = 'c';
|
||||
} else if (ctrl_x_mode_not_defined_yet()) {
|
||||
buf[i++] = 'x';
|
||||
}
|
||||
} else {
|
||||
if (State & REPLACE_FLAG) {
|
||||
buf[i++] = 'R';
|
||||
} else {
|
||||
buf[i++] = 'i';
|
||||
}
|
||||
if (ins_compl_active()) {
|
||||
buf[i++] = 'c';
|
||||
} else if (ctrl_x_mode_not_defined_yet()) {
|
||||
buf[i++] = 'x';
|
||||
}
|
||||
}
|
||||
if (ins_compl_active()) {
|
||||
buf[i++] = 'c';
|
||||
} else if (ctrl_x_mode_not_defined_yet()) {
|
||||
buf[i++] = 'x';
|
||||
}
|
||||
} else if ((State & CMDLINE) || exmode_active) {
|
||||
buf[i++] = 'c';
|
||||
|
@ -136,6 +136,12 @@ describe('mappings with <Cmd>', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('handles character containing K_SPECIAL (0x80) byte correctly', function()
|
||||
command([[noremap <F3> <Cmd>let g:str = '‥'<CR>]])
|
||||
feed('<F3>')
|
||||
eq('‥', eval('g:str'))
|
||||
end)
|
||||
|
||||
it('works in various modes and sees correct `mode()` value', function()
|
||||
-- normal mode
|
||||
feed('<F3>')
|
||||
|
Loading…
Reference in New Issue
Block a user