diff src/testdir/test_textprop.vim @ 30261:6b658ef69e93 v9.0.0466

patch 9.0.0466: virtual text wrong after adding line break after line Commit: https://github.com/vim/vim/commit/ebd0e8bb853cb744b60bf4f57011c4379ae4aaed Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 14 22:13:59 2022 +0100 patch 9.0.0466: virtual text wrong after adding line break after line Problem: Virtual text wrong after adding line break after line. Solution: Pass an "eol" flag to where text properties are adjusted. (closes #11131)
author Bram Moolenaar <Bram@vim.org>
date Wed, 14 Sep 2022 23:15:03 +0200
parents 45788c16b3a5
children 5f112a0b4da1
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2908,6 +2908,29 @@ func Test_prop_above_with_indent()
   call prop_type_delete('indented')
 endfunc
 
+func Test_prop_below_split_line()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+      vim9script
+      setline(1, ['one one one', 'two two two', 'three three three'])
+      prop_type_add('test', {highlight: 'ModeMsg'})
+      prop_add(2, 0, {
+          text:  '└─ Virtual text below the 2nd line',
+          type: 'test',
+          text_align: 'below',
+          text_padding_left: 3
+      })
+  END
+  call writefile(lines, 'XscriptPropBelowSpitLine', 'D')
+  let buf = RunVimInTerminal('-S XscriptPropBelowSpitLine', #{rows: 8})
+  call term_sendkeys(buf, "2GA\<CR>xx")
+  call VerifyScreenDump(buf, 'Test_prop_below_split_line_1', {})
+
+  call term_sendkeys(buf, "\<Esc>")
+  call StopVimInTerminal(buf)
+endfunc
+
 func Test_props_with_text_override()
   CheckRunVimInTerminal
 
@@ -2920,7 +2943,7 @@ func Test_props_with_text_override()
       hi CursorLine cterm=underline ctermbg=lightgrey
       set cursorline
   END
-  call writefile(lines, 'XscriptPropsOverride')
+  call writefile(lines, 'XscriptPropsOverride', 'D')
   let buf = RunVimInTerminal('-S XscriptPropsOverride', #{rows: 6, cols: 60})
   call VerifyScreenDump(buf, 'Test_prop_with_text_override_1', {})
 
@@ -2929,7 +2952,6 @@ func Test_props_with_text_override()
   call VerifyScreenDump(buf, 'Test_prop_with_text_override_2', {})
 
   call StopVimInTerminal(buf)
-  call delete('XscriptPropsOverride')
 endfunc
 
 func Test_props_with_text_CursorMoved()