diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-24 14:21:39 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-02-24 14:21:39 +0100 |
commit | 048761bcd40ec630fd3e039f0066cf4e484ceabd (patch) | |
tree | ff2ef331cffbf627627cfd47afb6b2746c7ed232 /src/testdir/test_virtualedit.vim | |
parent | 0dc0bff000fd804c6b0778ccc4554a4e4c82c8c9 (diff) |
patch 9.1.0132: "C" doesn't include composing chars with 'virtualedit'v9.1.0132
Problem: using "C" and 've=all' set, doesn't include composing chars
when changing a line, keeps the composing chars for whatever
is typed afterwards.
Solution: Use mb_head_off() and mb_ptr2len() instead of mb_tail_off().
(zeertzjq)
closes: #14083
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_virtualedit.vim')
-rw-r--r-- | src/testdir/test_virtualedit.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_virtualedit.vim b/src/testdir/test_virtualedit.vim index ec2b276c3f..48d4aa0616 100644 --- a/src/testdir/test_virtualedit.vim +++ b/src/testdir/test_virtualedit.vim @@ -77,13 +77,30 @@ endfunc func Test_edit_change() new set virtualedit=all + call setline(1, "\t⒌") normal Cx call assert_equal('x', getline(1)) + + call setline(1, "\ta̳") + normal Cx + call assert_equal('x', getline(1)) + + call setline(1, "\tβ̳") + normal Cx + call assert_equal('x', getline(1)) + + if has('arabic') + call setline(1, "\tلا") + normal Cx + call assert_equal('x', getline(1)) + endif + " Do a visual block change call setline(1, ['a', 'b', 'c']) exe "normal gg3l\<C-V>2jcx" call assert_equal(['a x', 'b x', 'c x'], getline(1, '$')) + bwipe! set virtualedit= endfunc |