summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-11 16:47:22 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-11 16:47:22 +0100
commita9a364872e41932990aba1787af65f67c7e14917 (patch)
treef4e456fe564164e54798cf1a6e5d53e0e8dd2644
parent877151b3d8f6dacca56ce8e7f20fa5b27142d782 (diff)
downloadvim-git-a9a364872e41932990aba1787af65f67c7e14917.tar.gz
patch 9.0.0723: extra empty line below virtual text when 'list' is setv9.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)
-rw-r--r--src/drawline.c4
-rw-r--r--src/testdir/dumps/Test_long_text_with_padding_2.dump8
-rw-r--r--src/testdir/test_textprop.vim3
-rw-r--r--src/version.c2
4 files changed, 15 insertions, 2 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 2f28417ac..3a4156bc2 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -2017,7 +2017,7 @@ win_line(
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;
+ text_prop_follows = TRUE;
// When 'wrap' is off then for "below" we need
// to start a new line explictly.
@@ -2067,7 +2067,7 @@ win_line(
// If this is an "above" text prop and 'nowrap' the we
// must wrap anyway.
text_prop_above = above;
- text_prop_follows = other_tpi != -1
+ text_prop_follows |= other_tpi != -1
&& (wp->w_p_wrap
|| (text_props[other_tpi].tp_flags
& (TP_FLAG_ALIGN_BELOW | TP_FLAG_ALIGN_RIGHT)));
diff --git a/src/testdir/dumps/Test_long_text_with_padding_2.dump b/src/testdir/dumps/Test_long_text_with_padding_2.dump
new file mode 100644
index 000000000..981613fc8
--- /dev/null
+++ b/src/testdir/dumps/Test_long_text_with_padding_2.dump
@@ -0,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|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index e4a5f2d65..41d160943 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3256,6 +3256,9 @@ func Test_long_text_below_with_padding()
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
diff --git a/src/version.c b/src/version.c
index 26768930f..9130e787a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 723,
+/**/
722,
/**/
721,