1
0
forked from aniani/vim

patch 9.0.0130: cursor position wrong when inserting around virtual text

Problem:    Cursor position wrong when inserting around virtual text.
Solution:   Update the cursor position properly.
This commit is contained in:
Bram Moolenaar
2022-08-01 15:52:55 +01:00
parent 05a8061eec
commit 1f4ee19eef
6 changed files with 29 additions and 13 deletions

View File

@@ -2256,4 +2256,20 @@ func Test_removed_prop_with_text_cleans_up_array()
bwipe!
endfunc
def Test_insert_text_before_virtual_text()
new foobar
setline(1, '12345678')
prop_type_add('test', {highlight: 'Search'})
prop_add(1, 5, {
type: 'test',
text: ' virtual text '
})
normal! f4axyz
normal! f5iXYZ
assert_equal('1234xyzXYZ5678', getline(1))
prop_type_delete('test')
bwipe!
enddef
" vim: shiftwidth=2 sts=2 expandtab