]> granicus.if.org Git - vim/commitdiff
patch 8.1.2287: using EndOfBuffer highlight in popup does not look good v8.1.2287
authorBram Moolenaar <Bram@vim.org>
Sun, 10 Nov 2019 16:22:31 +0000 (17:22 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 Nov 2019 16:22:31 +0000 (17:22 +0100)
Problem:    Using EndOfBuffer highlight in popup does not look good.
Solution:   Do not EndOfBuffer highlight. (closes #5204)

src/drawscreen.c
src/testdir/dumps/Test_popupwin_02.dump
src/testdir/dumps/Test_popupwin_04.dump
src/testdir/dumps/Test_popupwin_04a.dump
src/testdir/dumps/Test_popupwin_05.dump
src/testdir/dumps/Test_popupwin_06.dump
src/testdir/dumps/Test_popupwin_07.dump
src/testdir/dumps/Test_popupwin_08.dump
src/testdir/test_popupwin.vim
src/version.c

index abf34b5e99963b2202e0aa103b2d60cf50520453..275925727b3ef8b5dea1cee2a0e38191825d26f2 100644 (file)
@@ -2535,8 +2535,10 @@ win_update(win_T *wp)
 
        // Make sure the rest of the screen is blank
        // put '~'s on rows that aren't part of the file.
-       win_draw_end(wp, WIN_IS_POPUP(wp) ? ' ' : '~',
-                                      ' ', FALSE, row, wp->w_height, HLF_EOB);
+       if (WIN_IS_POPUP(wp))
+           win_draw_end(wp, ' ', ' ', FALSE, row, wp->w_height, HLF_AT);
+       else
+           win_draw_end(wp, '~', ' ', FALSE, row, wp->w_height, HLF_EOB);
     }
 
 #ifdef SYN_TIME_LIMIT
index 0de7f4954e8283664814d0a602c85973878c10b5..9f658e5c8c93f4f16e746cbf4adc03d7e3c20335 100644 (file)
@@ -1,10 +1,10 @@
 | +8#0000001#e0e0e08|+| |[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|[|N|o| |N|a|m|e|]| | +1&&@49|X+8#0000001#e0e0e08
 > +0#0000000#ffffff0@74
-|~+0#4040ff13&| @73
-|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
-|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @5| +0#4040ff13#ffffff0@46
+|~+0&#e0e0e08| @73
+|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#0000000#e0e0e08@46
+|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @5| +0#0000000#e0e0e08@46
 |~| @73
 |~| @73
 |~| @73
 |~| @73
-| +0#0000000&@56|0|,|0|-|1| @8|A|l@1| 
+| +0&#ffffff0@56|0|,|0|-|1| @8|A|l@1| 
index c8b04389c41e15b73e86dc1753de18ff9075389d..d83bedafb50061b34d6d6dcc31bb853df94322c5 100644 (file)
@@ -1,10 +1,10 @@
 > +0&#ffffff0@74
-|~+0#4040ff13&| @73
+|~+0&#e0e0e08| @73
 |~| @73
-|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#4040ff13#ffffff0@46
-|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @5| +0#4040ff13#ffffff0@46
+|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @10| +0#0000000#e0e0e08@46
+|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @5| +0#0000000#e0e0e08@46
 |~| @73
 |~| @73
 |~| @73
 |~| @73
-|:+0#0000000&|q|u|i|t|!| @50|0|,|0|-|1| @8|A|l@1| 
+|:+0&#ffffff0|q|u|i|t|!| @50|0|,|0|-|1| @8|A|l@1| 
index 2e6b6acac57acc68d755374b1f6efac105575e42..4df0dd393df5597ffdb3102c5a7164096e41f463 100644 (file)
@@ -1,10 +1,10 @@
 > +0&#ffffff0@11
-|~+0#4040ff13&| @10
+|~+0&#e0e0e08| @10
 |~| @10
 |~| @6|o+0#0000001#ffd7ff255|t|h|e
-|~+0#4040ff13#ffffff0| @6|r+0#0000001#ffd7ff255| |t|a
-|~+0#4040ff13#ffffff0| @6|b+0#0000001#ffd7ff255| @2
-|~+0#4040ff13#ffffff0| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o
-|~+0#4040ff13#ffffff0| @6|m+0#ff404010#ffd7ff255@1|e|n
-|~+0#4040ff13#ffffff0| @6|t+0#ff404010#ffd7ff255| +0#0000001&|l|i
+|~+0#0000000#e0e0e08| @6|r+0#0000001#ffd7ff255| |t|a
+|~+0#0000000#e0e0e08| @6|b+0#0000001#ffd7ff255| @2
+|~+0#0000000#e0e0e08| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o
+|~+0#0000000#e0e0e08| @6|m+0#ff404010#ffd7ff255@1|e|n
+|~+0#0000000#e0e0e08| @6|t+0#ff404010#ffd7ff255| +0#0000001&|l|i
 | +0#0000000#ffffff0@5|0|,|n+0#0000001#ffd7ff255|e| @1
index 2c74d7469ed9b84b6873988088ca54ae9ca363ff..7e23a09ce0691344685770d9ec0e226cd4d09543 100644 (file)
@@ -1,10 +1,10 @@
 > +0&#ffffff0@74
-|~+0#4040ff13&| @73
+|~+0&#e0e0e08| @73
 |~| @73
-|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @5| +0#4040ff13#ffffff0@51
-|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| | +0#4040ff13#ffffff0@51
-|~| @6| +0&#ffd7ff255@14| +0&#ffffff0@51
+|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @5| +0#0000000#e0e0e08@51
+|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| | +0#0000000#e0e0e08@51
+|~| @6| +0#4040ff13#ffd7ff255@14| +0#0000000#e0e0e08@51
 |~| @73
 |~| @73
 |~| @73
-|:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| 
+|:+0&#ffffff0|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| 
index 59a9d0ed00d9c664d0a63cd5cd2121bde180c786..6d8950324611380f996203a9ba93fd7594b49013 100644 (file)
@@ -1,10 +1,10 @@
 > +0&#ffffff0@74
-|~+0#4040ff13&| @73
+|~+0&#e0e0e08| @73
 |~| @73
-|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @15| +0#4040ff13#ffffff0@41
-|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @10| +0#4040ff13#ffffff0@41
-|~| @6|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i|t| |h|e| +0#4040ff13#ffffff0@41
-|~| @6|r+0#0000001#ffd7ff255|e| @22| +0#4040ff13#ffffff0@41
+|~| @6|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @15| +0#0000000#e0e0e08@41
+|~| @6|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @10| +0#0000000#e0e0e08@41
+|~| @6|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i|t| |h|e| +0#0000000#e0e0e08@41
+|~| @6|r+0#0000001#ffd7ff255|e| @22| +0#0000000#e0e0e08@41
 |~| @73
 |~| @73
-|:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| 
+|:+0&#ffffff0|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| 
index d5a5d05ec3b6e6a9fd1d182ca8e43739e513af25..07f1fc46748f0de24895cef7ebb9b5a0632499b7 100644 (file)
@@ -1,10 +1,10 @@
 > +0&#ffffff0@74
-|~+0#4040ff13&| @73
+|~+0&#e0e0e08| @73
 |~| @73
 |~| @73
 |~| @73
 |~| @73
 |~| @52|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @11
-|~+0#4040ff13#ffffff0| @52|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @6
+|~+0#0000000#e0e0e08| @52|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @6
 |:+0#0000000#ffffff0| @52|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i
 | +0#0000000#ffffff0@53|t+0#0000001#ffd7ff255| |h|e|r|e| @14
index 114e64256ace0e30dcb505c23a915916e8ac1b2d..814c979c20794c4d252e64aa2d74213504041342 100644 (file)
@@ -1,10 +1,10 @@
 >x+0&#ffffff0@2| @71
-|~+0#4040ff13&| @73
+|~+0&#e0e0e08| @73
 |~| @73
 |~| @73
 |~| @73
 |~| @73
 |~| @73
 |~| @73
-| +0#0000000&@74
+| +0&#ffffff0@74
 @57|1|,|1| @10|A|l@1| 
index 52d5add328d0cd5d6b9f5c3b0f5a322a77947896..ed4a7759ee869886d27bfa8161d22a8d642bc0b9 100644 (file)
@@ -12,6 +12,7 @@ func Test_simple_popup()
        call setline(1, range(1, 100))
        hi PopupColor1 ctermbg=lightblue
        hi PopupColor2 ctermbg=lightcyan
+       hi EndOfBuffer ctermbg=lightgrey
        hi Comment ctermfg=red
        call prop_type_add('comment', #{highlight: 'Comment'})
        let winid = popup_create('hello there', #{line: 3, col: 11, minwidth: 20, highlight: 'PopupColor1'})
index ab75ea75ff8e3ef31e9f889387c9a33648defe1d..34e5b2f36101907725f83bcfe926170365bf8fdb 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2287,
 /**/
     2286,
 /**/