Patch 9.0.0723
Problem: Extra empty line below virtual text when 'list' is set.
Solution: Do not reset lcs_eol_one but set text_prop_follows. (closes #11339)
Files: src/drawline.c, src/testdir/test_textprop.vim,
src/testdir/dumps/Test_long_text_with_padding_2.dump
*** ../vim-9.0.0722/src/drawline.c 2022-10-11 15:29:28.487421459 +0100
--- src/drawline.c 2022-10-11 16:45:30.273604619 +0100
***************
*** 2017,2023 ****
if (lcs_eol_one < 0 && wlv.col
+ wlv.n_extra - 2 > wp->w_width)
// don't bail out at end of line
! lcs_eol_one = 0;
// When 'wrap' is off then for "below" we need
// to start a new line explictly.
--- 2017,2023 ----
if (lcs_eol_one < 0 && wlv.col
+ wlv.n_extra - 2 > wp->w_width)
// don't bail out at end of line
! text_prop_follows = TRUE;
// When 'wrap' is off then for "below" we need
// to start a new line explictly.
***************
*** 2067,2073 ****
// If this is an "above" text prop and 'nowrap' the we
// must wrap anyway.
text_prop_above = above;
! text_prop_follows = other_tpi != -1
&& (wp->w_p_wrap
|| (text_props[other_tpi].tp_flags
& (TP_FLAG_ALIGN_BELOW | TP_FLAG_ALIGN_RIGHT)));
--- 2067,2073 ----
// If this is an "above" text prop and 'nowrap' the we
// must wrap anyway.
text_prop_above = above;
! text_prop_follows |= other_tpi != -1
&& (wp->w_p_wrap
|| (text_props[other_tpi].tp_flags
& (TP_FLAG_ALIGN_BELOW | TP_FLAG_ALIGN_RIGHT)));
*** ../vim-9.0.0722/src/testdir/test_textprop.vim 2022-10-11 15:29:28.487421459 +0100
--- src/testdir/test_textprop.vim 2022-10-11 16:41:16.443981745 +0100
***************
*** 3256,3261 ****
--- 3256,3264 ----
let buf = RunVimInTerminal('-S XlongTextBelowWithPadding', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_long_text_with_padding_1', {})
+ call term_sendkeys(buf, ":set list\<CR>")
+ call VerifyScreenDump(buf, 'Test_long_text_with_padding_2', {})
+
call StopVimInTerminal(buf)
endfunc
*** ../vim-9.0.0722/src/testdir/dumps/Test_long_text_with_padding_2.dump 2022-10-11 16:46:46.349946175 +0100
--- src/testdir/dumps/Test_long_text_with_padding_2.dump 2022-10-11 16:41:21.972026846 +0100
***************
*** 0 ****
--- 1,8 ----
+ |f+0&#ffffff0|i|r|s|t| |l|i|n|e|$+0#4040ff13&| +0#0000000&@48
+ @3|a+0&#ffd7ff255|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|t|e|r| |a|f|…
+ | +0&#ffffff0@29|m+0&#ffd7ff255|o|r|e| |m|o|r|e| |m|o|r|e| |m|o|r|e| |m|o|r|e| |m|o|r|e|…
+ |s+0&#ffffff0|e|c|o|n|d| >l|i|n|e|$+0#4040ff13&| +0#0000000&@47
+ |~+0#4040ff13&| @58
+ |~| @58
+ |~| @58
+ |:+0#0000000&|s|e|t| |l|i|s|t| @32|2|,|8| @10|A|l@1|
*** ../vim-9.0.0722/src/version.c 2022-10-11 15:29:28.487421459 +0100
--- src/version.c 2022-10-11 16:44:14.041203165 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 723,
/**/
--
Q: How does a UNIX Guru pick up a girl?
A: look; grep; which; eval; nice; uname; talk; date;
/// 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 ///