mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
vim-patch:7.4.1742
Problem: strgetchar() does not work correctly.
Solution: use mb_cptr2len(). Add a test. (Naruhiko Nishino)
5d18e0eca5
This commit is contained in:
@@ -15640,7 +15640,7 @@ static void f_strgetchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
break;
|
||||
}
|
||||
charidx--;
|
||||
byteidx += mb_char2len(str[byteidx]);
|
||||
byteidx += mb_cptr2len(str + byteidx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user