# HG changeset patch # User Bram Moolenaar # Date 1663687804 -7200 # Node ID d03040b399defcb9ee43c1c7384a66333524ddae # Parent 06b1915686a0186915ae85d7de12d6bcca859bb8 patch 9.0.0516: virtual text "above" highlights gap after it Commit: https://github.com/vim/vim/commit/ccfaa075918639b57925b16902cad339ab39b18c Author: Bram Moolenaar Date: Tue Sep 20 16:15:30 2022 +0100 patch 9.0.0516: virtual text "above" highlights gap after it Problem: Virtual text "above" highlights gap after it. Solution: Do not highlight the gap. (closes https://github.com/vim/vim/issues/11138) diff --git a/src/drawline.c b/src/drawline.c --- a/src/drawline.c +++ b/src/drawline.c @@ -440,7 +440,7 @@ text_prop_position( *n_extra = n_used + before + after + padding; *n_attr = mb_charlen(*p_extra); if (above) - *n_attr -= padding; + *n_attr -= padding + after; *n_attr_skip = before + padding + col_off; } } diff --git a/src/testdir/dumps/Test_prop_with_text_above_1.dump b/src/testdir/dumps/Test_prop_with_text_above_1.dump --- a/src/testdir/dumps/Test_prop_with_text_above_1.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_1.dump @@ -1,9 +1,9 @@ -|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @42 -|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @41 -|o+0&#ffffff0|n|e| |t|w|o| @52 +|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@42 +|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@41 +|o|n|e| |t|w|o| @52 |t|h|r>e@1| |f|o|u|r| @49 -@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @43 -|f+0&#ffffff0|i|v|e| |s|i|x| @51 +@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@43 +|f|i|v|e| |s|i|x| @51 |~+0#4040ff13&| @58 |~| @58 | +0#0000000&@41|2|,|4| @10|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_1a.dump b/src/testdir/dumps/Test_prop_with_text_above_1a.dump --- a/src/testdir/dumps/Test_prop_with_text_above_1a.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_1a.dump @@ -1,9 +1,9 @@ -|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @42 -|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @41 -|o+0&#ffffff0|n|e| |t|w>o| @52 +|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@42 +|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@41 +|o|n|e| |t|w>o| @52 |t|h|r|e@1| |f|o|u|r| @49 -@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @43 -|f+0&#ffffff0|i|v|e| |s|i|x| @51 +@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@43 +|f|i|v|e| |s|i|x| @51 |~+0#4040ff13&| @58 |~| @58 | +0#0000000&@41|1|,|7|-|1|2|7| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_1b.dump b/src/testdir/dumps/Test_prop_with_text_above_1b.dump --- a/src/testdir/dumps/Test_prop_with_text_above_1b.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_1b.dump @@ -1,9 +1,9 @@ -|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @42 -|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @41 ->o+0&#ffffff0|n|e| |t|w|o| @52 +|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@42 +|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@41 +>o|n|e| |t|w|o| @52 |t|h|r|e@1| |f|o|u|r| @49 -@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @43 -|f+0&#ffffff0|i|v|e| |s|i|x| @51 +@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@43 +|f|i|v|e| |s|i|x| @51 |~+0#4040ff13&| @58 |~| @58 | +0#0000000&@41|1|,|1|-|1|2|1| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_1c.dump b/src/testdir/dumps/Test_prop_with_text_above_1c.dump --- a/src/testdir/dumps/Test_prop_with_text_above_1c.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_1c.dump @@ -1,9 +1,9 @@ -|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @42 -|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @41 -|o+0&#ffffff0|n>e| |t|w|o| @52 +|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@42 +|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@41 +|o|n>e| |t|w|o| @52 |t|h|r|e@1| |f|o|u|r| @49 -@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @43 -|f+0&#ffffff0|i|v|e| |s|i|x| @51 +@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@43 +|f|i|v|e| |s|i|x| @51 |~+0#4040ff13&| @58 |~| @58 |:+0#0000000&|s|e|t| |s|h|o|w|b|r|e|a|k|=|>@1| @24|1|,|3|-|1|2|3| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_2.dump b/src/testdir/dumps/Test_prop_with_text_above_2.dump --- a/src/testdir/dumps/Test_prop_with_text_above_2.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_2.dump @@ -1,9 +1,9 @@ -|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @42 -|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @41 ->o+0&#ffffff0|n|e| |t|w|o| @52 +|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@42 +|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@41 +>o|n|e| |t|w|o| @52 |t|h|r|e@1| |f|o|u|r| @49 -@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @43 -|f+0&#ffffff0|i|v|e| |s|i|x| @51 +@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@43 +|f|i|v|e| |s|i|x| @51 |~+0#4040ff13&| @58 |~| @58 |-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@29|1|,|1|-|1|2|1| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_3.dump b/src/testdir/dumps/Test_prop_with_text_above_3.dump --- a/src/testdir/dumps/Test_prop_with_text_above_3.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_3.dump @@ -1,9 +1,9 @@ -|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @42 -|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @41 -|i+0&#ffffff0|n|s|e|r|t|e|d> |o|n|e| |t|w|o| @43 +|f+0&#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@42 +|s+0&#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@41 +|i|n|s|e|r|t|e|d> |o|n|e| |t|w|o| @43 |t|h|r|e@1| |f|o|u|r| @49 -@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @43 -|f+0&#ffffff0|i|v|e| |s|i|x| @51 +@3|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@43 +|f|i|v|e| |s|i|x| @51 |~+0#4040ff13&| @58 |~| @58 | +0#0000000&@41|1|,|9|-|1|2|9| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_4.dump b/src/testdir/dumps/Test_prop_with_text_above_4.dump --- a/src/testdir/dumps/Test_prop_with_text_above_4.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_4.dump @@ -1,8 +1,8 @@ -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @36 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @35 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|i+0#0000000&|n|s|e|r|t|e|d> |o|n|e| |t|w|o| @37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @37 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000&|i|v|e| |s|i|x| @45 |~+0#4040ff13&| @58 |~| @58 diff --git a/src/testdir/dumps/Test_prop_with_text_above_5.dump b/src/testdir/dumps/Test_prop_with_text_above_5.dump --- a/src/testdir/dumps/Test_prop_with_text_above_5.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_5.dump @@ -1,8 +1,8 @@ -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @36 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @35 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|i+0#0000000&|n|s|e|r|t|e|d| |o|n|e| |t|w|o| @37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u>r| @43 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @37 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000&|i|v|e| |s|i|x| @45 |~+0#4040ff13&| @58 |~| @58 diff --git a/src/testdir/dumps/Test_prop_with_text_above_6.dump b/src/testdir/dumps/Test_prop_with_text_above_6.dump --- a/src/testdir/dumps/Test_prop_with_text_above_6.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_6.dump @@ -1,9 +1,9 @@ -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @36 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @35 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|i+0#0000000#e0e0e08|n|s|e|r|t|e>d+0&#ffffff0| |o|n|e| |t|w|o| @37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0&#ffffff0@48 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @37 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000&|i|v|e| |s|i|x| @45 |~+0#4040ff13&| @58 |-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@19|8| @8|1|,|8|-|1@1|6| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_7.dump b/src/testdir/dumps/Test_prop_with_text_above_7.dump --- a/src/testdir/dumps/Test_prop_with_text_above_7.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_7.dump @@ -1,9 +1,9 @@ -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @36 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @35 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|i+0#0000000#e0e0e08|n|s|e|r|t|e>d+0&#ffffff0| +0&#e0e0e08|o|n|e| |t|w|o| +0&#ffffff0@37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0#4040ff13#ffffff0| +0#0000000&@47 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @37 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000&|i|v|e| |s|i|x| @45 |~+0#4040ff13&| @58 |-+2#0000000&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@14|1| @8|1|,|8|-|1@1|6| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_with_text_above_8.dump b/src/testdir/dumps/Test_prop_with_text_above_8.dump --- a/src/testdir/dumps/Test_prop_with_text_above_8.dump +++ b/src/testdir/dumps/Test_prop_with_text_above_8.dump @@ -1,9 +1,9 @@ -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| @36 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| @35 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|i+0#0000000&|n|s|e|r|t|e|d| @45 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| >o+0#0000000&|n|e| |t|w|o| @46 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0&#ffffff0@48 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|3| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43 -| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|4| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| @37 +| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|4| | +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37 | +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000&|i|v|e| |s|i|x| @45 @42|2|,|1| @10|A|l@1| diff --git a/src/version.c b/src/version.c --- 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 */ /**/ + 516, +/**/ 515, /**/ 514,