forked from aniani/vim
patch 8.2.5058: input() does not handle composing characters properly
Problem: input() does not handle composing characters properly.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
(closes #10527)
This commit is contained in:
@@ -1545,6 +1545,10 @@ func Test_input_func()
|
||||
call feedkeys(":let c = input('name? ', \"x\\<BS>y\")\<CR>\<CR>", 'xt')
|
||||
call assert_equal('y', c)
|
||||
|
||||
" Test for using text with composing characters as default input
|
||||
call feedkeys(":let c = input('name? ', \"ã̳\")\<CR>\<CR>", 'xt')
|
||||
call assert_equal('ã̳', c)
|
||||
|
||||
" Test for using <CR> as default input
|
||||
call feedkeys(":let c = input('name? ', \"\\<CR>\")\<CR>x\<CR>", 'xt')
|
||||
call assert_equal(' x', c)
|
||||
|
||||
Reference in New Issue
Block a user