vim-patch:8.1.2235: "C" with 'virtualedit' set does not include multi-byte char

Problem:    "C" with 'virtualedit' set does not include multi-byte char.
Solution:   Include the whole multi-byte char. (Nobuhiro Takasaki,
            closes vim/vim#5152)
77ccc00340
This commit is contained in:
Jan Edmund Lazo 2019-11-01 22:26:06 -04:00
parent 90981f5861
commit 63ab994fba
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 10 additions and 0 deletions

View File

@ -1562,6 +1562,7 @@ int op_delete(oparg_T *oap)
oap->end = curwin->w_cursor;
curwin->w_cursor = oap->start;
}
mb_adjust_opend(oap);
}
if (oap->line_count == 1) { /* delete characters within one line */

View File

@ -73,3 +73,12 @@ func Test_edit_CTRL_G()
bwipe!
set virtualedit=
endfunc
func Test_edit_change()
new
set virtualedit=all
call setline(1, "\t⒌")
normal Cx
call assert_equal('x', getline(1))
bwipe!
endfunc