diff src/testdir/test_textprop.vim @ 29688:1455814702ad v9.0.0184

patch 9.0.0184: virtual text prop highlight continues after truncation Commit: https://github.com/vim/vim/commit/1d8844aa59416dd306912b5563b8e928dfd387ba Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 10 13:39:35 2022 +0100 patch 9.0.0184: virtual text prop highlight continues after truncation Problem: Virtual text prop highlight continues after truncation. Solution: Recompute the length of attributes.
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Aug 2022 14:45:02 +0200
parents 4153e4815b36
children 1a9b3c96ed08
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -1898,6 +1898,24 @@ func Test_prop_with_linebreak()
   call delete('XscriptPropWithLinebreak')
 endfunc
 
+func Test_prop_with_wrap()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+      vim9script
+      set linebreak
+      setline(1, 'asdf '->repeat(15))
+      prop_type_add('test', {highlight: 'Special'})
+      prop_add(1, 43, {text: 'some virtual text', type: 'test'})
+  END
+  call writefile(lines, 'XscriptPropWithWrap')
+  let buf = RunVimInTerminal('-S XscriptPropWithWrap', #{rows: 6, cols: 50})
+  call VerifyScreenDump(buf, 'Test_prop_with_wrap_1', {})
+
+  call StopVimInTerminal(buf)
+  call delete('XscriptPropWithWrap')
+endfunc
+
 func Test_prop_after_tab()
   CheckRunVimInTerminal