comparison src/testdir/test_textprop.vim @ 29655:53e434838a85 v9.0.0168

patch 9.0.0168: cursor positioned wrong with two virtual text properties Commit: https://github.com/vim/vim/commit/25463610dfc7a4984f70b030463fb98b09772ad9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 8 11:07:47 2022 +0100 patch 9.0.0168: cursor positioned wrong with two virtual text properties Problem: Cursor positioned wrong with two virtual text properties close together. (Ben Jackson) Solution: Add the original size, not the computed one. (closes #10864)
author Bram Moolenaar <Bram@vim.org>
date Mon, 08 Aug 2022 12:15:06 +0200
parents 9cd050914eb6
children b90b037e80be
comparison
equal deleted inserted replaced
29654:bba83ec5cf86 29655:53e434838a85
2315 2315
2316 call setline(2, 'prepost') 2316 call setline(2, 'prepost')
2317 call prop_type_add('multibyte', #{highlight: 'Visual'}) 2317 call prop_type_add('multibyte', #{highlight: 'Visual'})
2318 call prop_add(2, 4, #{type: 'multibyte', text: 'söme和平téxt'}) 2318 call prop_add(2, 4, #{type: 'multibyte', text: 'söme和平téxt'})
2319 2319
2320 call setline(3, '') 2320 call setline(3, 'Foo foo = { 1, 2 };')
2321 call prop_add(3, 1, #{type: 'someprop', text: 'empty line'}) 2321 call prop_type_add( 'testprop', #{highlight: 'Comment'})
2322 call prop_add(3, 13, #{type: 'testprop', text: '.x='})
2323 call prop_add(3, 16, #{type: 'testprop', text: '.y='})
2324
2325 call setline(4, '')
2326 call prop_add(4, 1, #{type: 'someprop', text: 'empty line'})
2322 END 2327 END
2323 call writefile(lines, 'XscriptPropsWithText') 2328 call writefile(lines, 'XscriptPropsWithText')
2324 let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 6, cols: 60}) 2329 let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 8, cols: 60})
2325 call VerifyScreenDump(buf, 'Test_prop_inserts_text_1', {}) 2330 call VerifyScreenDump(buf, 'Test_prop_inserts_text_1', {})
2326 2331
2327 call term_sendkeys(buf, ":set signcolumn=yes\<CR>") 2332 call term_sendkeys(buf, ":set signcolumn=yes\<CR>")
2328 call VerifyScreenDump(buf, 'Test_prop_inserts_text_2', {}) 2333 call VerifyScreenDump(buf, 'Test_prop_inserts_text_2', {})
2329 2334
2330 call term_sendkeys(buf, "2G$") 2335 call term_sendkeys(buf, "2G$")
2331 call VerifyScreenDump(buf, 'Test_prop_inserts_text_3', {}) 2336 call VerifyScreenDump(buf, 'Test_prop_inserts_text_3', {})
2332 2337
2333 call term_sendkeys(buf, "3G") 2338 call term_sendkeys(buf, "3Gf1")
2334 call VerifyScreenDump(buf, 'Test_prop_inserts_text_4', {}) 2339 call VerifyScreenDump(buf, 'Test_prop_inserts_text_4', {})
2340 call term_sendkeys(buf, "f2")
2341 call VerifyScreenDump(buf, 'Test_prop_inserts_text_5', {})
2342
2343 call term_sendkeys(buf, "4G")
2344 call VerifyScreenDump(buf, 'Test_prop_inserts_text_6', {})
2335 2345
2336 call StopVimInTerminal(buf) 2346 call StopVimInTerminal(buf)
2337 call delete('XscriptPropsWithText') 2347 call delete('XscriptPropsWithText')
2338 endfunc 2348 endfunc
2339 2349