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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user