# HG changeset patch # User Bram Moolenaar # Date 1573403403 -3600 # Node ID 78e43be18f6b0b5cfa84712a7fbf0f92e42df53e # Parent 48022f69edd991e02ccaa5d4592a40e877e83fd2 patch 8.1.2287: using EndOfBuffer highlight in popup does not look good Commit: https://github.com/vim/vim/commit/1666ac9c5685328895f6480ad6b14d1e11c77025 Author: Bram Moolenaar Date: Sun Nov 10 17:22:31 2019 +0100 patch 8.1.2287: using EndOfBuffer highlight in popup does not look good Problem: Using EndOfBuffer highlight in popup does not look good. Solution: Do not EndOfBuffer highlight. (closes https://github.com/vim/vim/issues/5204) diff --git a/src/drawscreen.c b/src/drawscreen.c --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -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 diff --git a/src/testdir/dumps/Test_popupwin_02.dump b/src/testdir/dumps/Test_popupwin_02.dump --- a/src/testdir/dumps/Test_popupwin_02.dump +++ b/src/testdir/dumps/Test_popupwin_02.dump @@ -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| diff --git a/src/testdir/dumps/Test_popupwin_04.dump b/src/testdir/dumps/Test_popupwin_04.dump --- a/src/testdir/dumps/Test_popupwin_04.dump +++ b/src/testdir/dumps/Test_popupwin_04.dump @@ -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| diff --git a/src/testdir/dumps/Test_popupwin_04a.dump b/src/testdir/dumps/Test_popupwin_04a.dump --- a/src/testdir/dumps/Test_popupwin_04a.dump +++ b/src/testdir/dumps/Test_popupwin_04a.dump @@ -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 diff --git a/src/testdir/dumps/Test_popupwin_05.dump b/src/testdir/dumps/Test_popupwin_05.dump --- a/src/testdir/dumps/Test_popupwin_05.dump +++ b/src/testdir/dumps/Test_popupwin_05.dump @@ -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| diff --git a/src/testdir/dumps/Test_popupwin_06.dump b/src/testdir/dumps/Test_popupwin_06.dump --- a/src/testdir/dumps/Test_popupwin_06.dump +++ b/src/testdir/dumps/Test_popupwin_06.dump @@ -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| diff --git a/src/testdir/dumps/Test_popupwin_07.dump b/src/testdir/dumps/Test_popupwin_07.dump --- a/src/testdir/dumps/Test_popupwin_07.dump +++ b/src/testdir/dumps/Test_popupwin_07.dump @@ -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 diff --git a/src/testdir/dumps/Test_popupwin_08.dump b/src/testdir/dumps/Test_popupwin_08.dump --- a/src/testdir/dumps/Test_popupwin_08.dump +++ b/src/testdir/dumps/Test_popupwin_08.dump @@ -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| diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -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'}) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2287, +/**/ 2286, /**/ 2285,