comparison src/testdir/test_textprop.vim @ 29633:e80174903fdf v9.0.0157

patch 9.0.0157: 'showbreak' displayed below truncated "after" text prop Commit: https://github.com/vim/vim/commit/cba6952e3499f85545c274873c67bb843d3f3518 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 6 21:03:53 2022 +0100 patch 9.0.0157: 'showbreak' displayed below truncated "after" text prop Problem: 'showbreak' displayed below truncated "after" text prop. Solution: Suppress 'showbreak' when "after" prop doesn't wrap.
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Aug 2022 22:15:06 +0200
parents 2f5610696bcd
children 592818fd3110
comparison
equal deleted inserted replaced
29632:ec65284d6f1f 29633:e80174903fdf
2334 2334
2335 call StopVimInTerminal(buf) 2335 call StopVimInTerminal(buf)
2336 call delete('XscriptPropsWithTextAfter') 2336 call delete('XscriptPropsWithTextAfter')
2337 endfunc 2337 endfunc
2338 2338
2339 func Test_props_with_text_after_below_trunc()
2340 CheckRunVimInTerminal
2341
2342 let lines =<< trim END
2343 vim9script
2344 edit foobar
2345 set showbreak=+++
2346 setline(1, ['onasdf asdf asdf asdf asd fas df', 'two'])
2347 prop_type_add('test', {highlight: 'Special'})
2348 prop_add(1, 0, {
2349 type: 'test',
2350 text: 'the quick brown fox jumps over the lazy dog',
2351 text_align: 'after'
2352 })
2353 prop_add(1, 0, {
2354 type: 'test',
2355 text: 'the quick brown fox jumps over the lazy dog',
2356 text_align: 'below'
2357 })
2358 normal G$
2359 END
2360 call writefile(lines, 'XscriptPropsAfterTrunc')
2361 let buf = RunVimInTerminal('-S XscriptPropsAfterTrunc', #{rows: 8, cols: 60})
2362 call VerifyScreenDump(buf, 'Test_prop_with_text_after_below_trunc_1', {})
2363
2364 call StopVimInTerminal(buf)
2365 call delete('XscriptPropsAfterTrunc')
2366 endfunc
2367
2339 func Test_props_with_text_after_joined() 2368 func Test_props_with_text_after_joined()
2340 CheckRunVimInTerminal 2369 CheckRunVimInTerminal
2341 2370
2342 let lines =<< trim END 2371 let lines =<< trim END
2343 call setline(1, ['one', 'two', 'three', 'four']) 2372 call setline(1, ['one', 'two', 'three', 'four'])