patch 8.2.2607: strcharpart() cannot include composing characters
Problem: strcharpart() cannot include composing characters.
Solution: Add the {skipcc} argument.
diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim
index b5937b2..c6d2e4e 100644
--- a/src/testdir/test_expr_utf8.vim
+++ b/src/testdir/test_expr_utf8.vim
@@ -31,6 +31,14 @@
call assert_equal('a', strcharpart('àxb', 0, 1))
call assert_equal('̀', strcharpart('àxb', 1, 1))
call assert_equal('x', strcharpart('àxb', 2, 1))
+
+
+ call assert_equal('a', strcharpart('àxb', 0, 1, 0))
+ call assert_equal('à', strcharpart('àxb', 0, 1, 1))
+ call assert_equal('x', strcharpart('àxb', 1, 1, 1))
+
+ call assert_fails("let v = strcharpart('abc', 0, 0, [])", 'E745:')
+ call assert_fails("let v = strcharpart('abc', 0, 0, 2)", 'E1023:')
endfunc
" vim: shiftwidth=2 sts=2 expandtab