diff 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
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2426,6 +2426,27 @@ func Test_props_with_text_after_wraps()
   call delete('XscriptPropsWithTextAfterWraps')
 endfunc
 
+func Test_props_with_text_after_nowrap()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+      set nowrap
+      call setline(1, ['one', 'two', 'three'])
+      call prop_type_add('belowprop', #{highlight: 'ErrorMsg'})
+      call prop_type_add('anotherprop', #{highlight: 'Search'})
+      call prop_add(1, 0, #{type: 'belowprop', text: ' Below the line ', text_align: 'below'})
+      call prop_add(2, 0, #{type: 'anotherprop', text: 'another', text_align: 'below'})
+      call prop_add(2, 0, #{type: 'belowprop', text: 'One More Here', text_align: 'below'})
+      normal G$
+  END
+  call writefile(lines, 'XscriptPropsAfterNowrap')
+  let buf = RunVimInTerminal('-S XscriptPropsAfterNowrap', #{rows: 8, cols: 60})
+  call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_1', {})
+
+  call StopVimInTerminal(buf)
+  call delete('XscriptPropsAfterNowrap')
+endfunc
+
 func Test_removed_prop_with_text_cleans_up_array()
   new
   call setline(1, 'some text here')