Patch 9.0.0184
Problem: Virtual text prop highlight continues after truncation.
Solution: Recompute the length of attributes.
Files: src/drawline.c, src/testdir/test_textprop.vim,
src/testdir/dumps/Test_prop_with_wrap_1.dump
*** ../vim-9.0.0183/src/drawline.c 2022-08-10 13:11:38.374350516 +0100
--- src/drawline.c 2022-08-10 13:34:18.492130358 +0100
***************
*** 1793,1798 ****
--- 1793,1799 ----
wlv.p_extra = p_extra_free2 = l;
wlv.n_extra = n_used + added;
n_attr_skip = added;
+ n_attr = mb_charlen(wlv.p_extra);
}
}
*** ../vim-9.0.0183/src/testdir/test_textprop.vim 2022-08-10 13:11:38.374350516 +0100
--- src/testdir/test_textprop.vim 2022-08-10 13:36:47.404591516 +0100
***************
*** 1898,1903 ****
--- 1898,1921 ----
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
*** ../vim-9.0.0183/src/testdir/dumps/Test_prop_with_wrap_1.dump 2022-08-10 13:38:31.886905636 +0100
--- src/testdir/dumps/Test_prop_with_wrap_1.dump 2022-08-10 13:36:52.460496301 +0100
***************
*** 0 ****
--- 1,6 ----
+ >a+0&#ffffff0|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|s+0#e000e06&|o|m|e| |v|i|…
+ |d+0#0000000&|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| |a|s|d|f| @17
+ |~+0#4040ff13&| @48
+ |~| @48
+ |~| @48
+ | +0#0000000&@31|1|,|1| @10|A|l@1|
*** ../vim-9.0.0183/src/version.c 2022-08-10 13:11:38.374350516 +0100
--- src/version.c 2022-08-10 13:38:21.759044604 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 184,
/**/
--
Life would be so much easier if we could just look at the source code.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///