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 #11138)
diff --git a/src/drawline.c b/src/drawline.c
index aa75190..0c6b9ab 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -440,7 +440,7 @@
 		*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
index 6f2b09d..1a478f1 100644
--- 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
index c56d88f..67d7a6b 100644
--- 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
index d2d9c7b..24fffb5 100644
--- 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
index 98c8571..bdf8811 100644
--- 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
index 7c84c73..3df0967 100644
--- 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
index a7277c2..f58a95b 100644
--- 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
index 1ab0b69..a87e349 100644
--- 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
index 1b91e24..88e5863 100644
--- 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
index faf9af6..0eda3a6 100644
--- 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
index 9caa3c3..dc22574 100644
--- 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
index f4c72fb..f6a6e91 100644
--- 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
index 9d26c3f..61555c1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    516,
+/**/
     515,
 /**/
     514,