comparison src/testdir/test_textprop.vim @ 29613:1a0aea1e23f4 v9.0.0147

patch 9.0.0147: cursor positioned wrong after two "below" text properties Commit: https://github.com/vim/vim/commit/50e75fe8d8c8ab262ab5b11d1498e5628044e07c Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 5 20:25:50 2022 +0100 patch 9.0.0147: cursor positioned wrong after two "below" text properties Problem: Cursor positioned wrong after two text properties with virtual text and "below" alignment. (Tim Pope) Solution: Do not stop after a text property using MAXCOL. (closes #10849)
author Bram Moolenaar <Bram@vim.org>
date Fri, 05 Aug 2022 21:30:03 +0200
parents e1c370197030
children bab343b21da8
comparison
equal deleted inserted replaced
29612:15c1eb8bc7fb 29613:1a0aea1e23f4
2316 call prop_type_add('afterprop', #{highlight: 'Search'}) 2316 call prop_type_add('afterprop', #{highlight: 'Search'})
2317 call prop_type_add('belowprop', #{highlight: 'DiffAdd'}) 2317 call prop_type_add('belowprop', #{highlight: 'DiffAdd'})
2318 call prop_add(1, 0, #{type: 'rightprop', text: ' RIGHT ', text_align: 'right'}) 2318 call prop_add(1, 0, #{type: 'rightprop', text: ' RIGHT ', text_align: 'right'})
2319 call prop_add(1, 0, #{type: 'afterprop', text: "\tAFTER\t", text_align: 'after'}) 2319 call prop_add(1, 0, #{type: 'afterprop', text: "\tAFTER\t", text_align: 'after'})
2320 call prop_add(1, 0, #{type: 'belowprop', text: ' BELOW ', text_align: 'below'}) 2320 call prop_add(1, 0, #{type: 'belowprop', text: ' BELOW ', text_align: 'below'})
2321 call prop_add(1, 0, #{type: 'belowprop', text: ' ALSO BELOW ', text_align: 'below'})
2321 2322
2322 call setline(2, 'Last line.') 2323 call setline(2, 'Last line.')
2323 call prop_add(2, 0, #{type: 'afterprop', text: ' After Last ', text_align: 'after'}) 2324 call prop_add(2, 0, #{type: 'afterprop', text: ' After Last ', text_align: 'after'})
2324 normal G$ 2325 normal G$
2325 2326
2326 call setline(3, 'right here') 2327 call setline(3, 'right here')
2327 call prop_add(3, 0, #{type: 'rightprop', text: 'söme和平téxt', text_align: 'right'}) 2328 call prop_add(3, 0, #{type: 'rightprop', text: 'söme和平téxt', text_align: 'right'})
2328 END 2329 END
2329 call writefile(lines, 'XscriptPropsWithTextAfter') 2330 call writefile(lines, 'XscriptPropsWithTextAfter')
2330 let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 6, cols: 60}) 2331 let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 8, cols: 60})
2331 call VerifyScreenDump(buf, 'Test_prop_with_text_after_1', {}) 2332 call VerifyScreenDump(buf, 'Test_prop_with_text_after_1', {})
2332 2333
2333 call StopVimInTerminal(buf) 2334 call StopVimInTerminal(buf)
2334 call delete('XscriptPropsWithTextAfter') 2335 call delete('XscriptPropsWithTextAfter')
2335 endfunc 2336 endfunc