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:
Michael Ennen
2016-10-23 17:07:36 -07:00
parent 9e5dca8490
commit b5dfdf0669
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}
}
}