patch 8.2.4988: textprop in wrong position when replacing multi-byte chars
Problem: Textprop in wrong position when replacing multi-byte chars.
Solution: Adjust textprop position. (closes #10461)
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 3203305..c29c10b 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -573,6 +573,13 @@
call assert_equal('yyyex xyyoxx', getline(1))
call assert_equal(expected, prop_list(1))
+ " Replace three 1-byte chars with three 2-byte ones.
+ exe "normal 0l3rø"
+ call assert_equal('yøøøx xyyoxx', getline(1))
+ let expected[0].length += 3
+ let expected[1].col += 3
+ call assert_equal(expected, prop_list(1))
+
call DeletePropTypes()
bwipe!
set bs&