Mercurial > vim
changeset 30361:d03040b399de v9.0.0516
patch 9.0.0516: virtual text "above" highlights gap after it
Commit: https://github.com/vim/vim/commit/ccfaa075918639b57925b16902cad339ab39b18c
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Sep 2022 17:30:04 +0200 |
parents | 06b1915686a0 |
children | 2922412560ad |
files | src/drawline.c src/testdir/dumps/Test_prop_with_text_above_1.dump src/testdir/dumps/Test_prop_with_text_above_1a.dump src/testdir/dumps/Test_prop_with_text_above_1b.dump src/testdir/dumps/Test_prop_with_text_above_1c.dump src/testdir/dumps/Test_prop_with_text_above_2.dump src/testdir/dumps/Test_prop_with_text_above_3.dump src/testdir/dumps/Test_prop_with_text_above_4.dump src/testdir/dumps/Test_prop_with_text_above_5.dump src/testdir/dumps/Test_prop_with_text_above_6.dump src/testdir/dumps/Test_prop_with_text_above_7.dump src/testdir/dumps/Test_prop_with_text_above_8.dump src/version.c |
diffstat | 13 files changed, 48 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }
--- 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|
--- 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|
--- 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|
--- 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|
--- 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|
--- 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|
--- 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
--- 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
--- 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|
--- 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|
--- 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|