mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
vim-patch:9.1.0137: <Del> in cmdline mode doesn't delete composing chars (#27636)
Problem: <Del> in cmdline mode doesn't delete composing chars
Solution: Use mb_head_off() and mb_ptr2len() (zeertzjq)
closes: vim/vim#14095
ff2b79d239
This commit is contained in:
@@ -1510,10 +1510,8 @@ static int command_line_erase_chars(CommandLineState *s)
|
||||
if (s->c == K_DEL && ccline.cmdpos != ccline.cmdlen) {
|
||||
ccline.cmdpos++;
|
||||
}
|
||||
|
||||
if (s->c == K_DEL) {
|
||||
CharBoundsOff bounds = utf_cp_bounds(ccline.cmdbuff, ccline.cmdbuff + ccline.cmdpos);
|
||||
ccline.cmdpos += bounds.begin_off != 0 ? bounds.end_off : 0;
|
||||
ccline.cmdpos += mb_off_next(ccline.cmdbuff, ccline.cmdbuff + ccline.cmdpos);
|
||||
}
|
||||
|
||||
if (ccline.cmdpos > 0) {
|
||||
|
Reference in New Issue
Block a user