comparison src/testdir/test_textprop.vim @ 29621:f1ed6f520d09 v9.0.0151

patch 9.0.0151: a "below" aligned text property does not work with 'nowrap' Commit: https://github.com/vim/vim/commit/4d91d347e65a5621621ea1e3c97dce2c677ed71d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 6 13:48:20 2022 +0100 patch 9.0.0151: a "below" aligned text property does not work with 'nowrap' Problem: A "below" aligned text property does not work with 'nowrap'. Solution: Start a new screen line to display the virtual text. (closes #10851)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Aug 2022 15:00:03 +0200
parents bab343b21da8
children 78418bd45852
comparison
equal deleted inserted replaced
29620:1e975951ffb7 29621:f1ed6f520d09
2424 2424
2425 call StopVimInTerminal(buf) 2425 call StopVimInTerminal(buf)
2426 call delete('XscriptPropsWithTextAfterWraps') 2426 call delete('XscriptPropsWithTextAfterWraps')
2427 endfunc 2427 endfunc
2428 2428
2429 func Test_props_with_text_after_nowrap()
2430 CheckRunVimInTerminal
2431
2432 let lines =<< trim END
2433 set nowrap
2434 call setline(1, ['one', 'two', 'three'])
2435 call prop_type_add('belowprop', #{highlight: 'ErrorMsg'})
2436 call prop_type_add('anotherprop', #{highlight: 'Search'})
2437 call prop_add(1, 0, #{type: 'belowprop', text: ' Below the line ', text_align: 'below'})
2438 call prop_add(2, 0, #{type: 'anotherprop', text: 'another', text_align: 'below'})
2439 call prop_add(2, 0, #{type: 'belowprop', text: 'One More Here', text_align: 'below'})
2440 normal G$
2441 END
2442 call writefile(lines, 'XscriptPropsAfterNowrap')
2443 let buf = RunVimInTerminal('-S XscriptPropsAfterNowrap', #{rows: 8, cols: 60})
2444 call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_1', {})
2445
2446 call StopVimInTerminal(buf)
2447 call delete('XscriptPropsAfterNowrap')
2448 endfunc
2449
2429 func Test_removed_prop_with_text_cleans_up_array() 2450 func Test_removed_prop_with_text_cleans_up_array()
2430 new 2451 new
2431 call setline(1, 'some text here') 2452 call setline(1, 'some text here')
2432 call prop_type_add('some', #{highlight: 'ErrorMsg'}) 2453 call prop_type_add('some', #{highlight: 'ErrorMsg'})
2433 let id1 = prop_add(1, 5, #{type: 'some', text: "SOME"}) 2454 let id1 = prop_add(1, 5, #{type: 'some', text: "SOME"})