To: vim_dev@googlegroups.com Subject: Patch 8.1.2287 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2287 Problem: Using EndOfBuffer highlight in popup does not look good. Solution: Do not EndOfBuffer highlight. (closes #5204) Files: src/drawscreen.c, src/testdir/test_popupwin.vim, 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 *** ../vim-8.1.2286/src/drawscreen.c 2019-10-24 22:32:27.692284767 +0200 --- src/drawscreen.c 2019-11-10 17:17:30.945540070 +0100 *************** *** 2535,2542 **** // 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); } #ifdef SYN_TIME_LIMIT --- 2535,2544 ---- // Make sure the rest of the screen is blank // put '~'s on rows that aren't part of the file. ! 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 *** ../vim-8.1.2286/src/testdir/test_popupwin.vim 2019-11-09 15:32:51.597873973 +0100 --- src/testdir/test_popupwin.vim 2019-11-10 17:11:36.411174969 +0100 *************** *** 12,17 **** --- 12,18 ---- 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'}) *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_02.dump 2019-05-26 23:32:03.175678045 +0200 --- src/testdir/dumps/Test_popupwin_02.dump 2019-11-10 17:11:58.547071246 +0100 *************** *** 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 |~| @73 |~| @73 |~| @73 |~| @73 ! | +0#0000000&@56|0|,|0|-|1| @8|A|l@1| --- 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&#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&#ffffff0@56|0|,|0|-|1| @8|A|l@1| *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_04.dump 2019-05-26 23:32:03.179678024 +0200 --- src/testdir/dumps/Test_popupwin_04.dump 2019-11-10 17:11:59.611066266 +0100 *************** *** 1,10 **** > +0&#ffffff0@74 ! |~+0#4040ff13&| @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 |~| @73 |~| @73 |~| @73 |~| @73 ! |:+0#0000000&|q|u|i|t|!| @50|0|,|0|-|1| @8|A|l@1| --- 1,10 ---- > +0&#ffffff0@74 ! |~+0&#e0e0e08| @73 |~| @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&#ffffff0|q|u|i|t|!| @50|0|,|0|-|1| @8|A|l@1| *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_04a.dump 2019-06-11 21:56:15.518267135 +0200 --- src/testdir/dumps/Test_popupwin_04a.dump 2019-11-10 17:12:00.659061362 +0100 *************** *** 1,10 **** > +0&#ffffff0@11 ! |~+0#4040ff13&| @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#ffffff0@5|0|,|n+0#0000001#ffd7ff255|e| @1 --- 1,10 ---- > +0&#ffffff0@11 ! |~+0&#e0e0e08| @10 |~| @10 |~| @6|o+0#0000001#ffd7ff255|t|h|e ! |~+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 *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_05.dump 2019-05-30 00:11:48.704086357 +0200 --- src/testdir/dumps/Test_popupwin_05.dump 2019-11-10 17:12:01.711056441 +0100 *************** *** 1,10 **** > +0&#ffffff0@74 ! |~+0#4040ff13&| @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 |~| @73 |~| @73 |~| @73 ! |:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| --- 1,10 ---- > +0&#ffffff0@74 ! |~+0&#e0e0e08| @73 |~| @73 ! |~| @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&#ffffff0|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_06.dump 2019-06-08 17:15:47.671568076 +0200 --- src/testdir/dumps/Test_popupwin_06.dump 2019-11-10 17:12:02.763051519 +0100 *************** *** 1,10 **** > +0&#ffffff0@74 ! |~+0#4040ff13&| @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 |~| @73 |~| @73 ! |:+0#0000000&|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| --- 1,10 ---- > +0&#ffffff0@74 ! |~+0&#e0e0e08| @73 |~| @73 ! |~| @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&#ffffff0|r|e|d|r|a|w| @49|0|,|0|-|1| @8|A|l@1| *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_07.dump 2019-07-14 18:22:53.793088979 +0200 --- src/testdir/dumps/Test_popupwin_07.dump 2019-11-10 17:12:03.815046600 +0100 *************** *** 1,10 **** > +0&#ffffff0@74 ! |~+0#4040ff13&| @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#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 --- 1,10 ---- > +0&#ffffff0@74 ! |~+0&#e0e0e08| @73 |~| @73 |~| @73 |~| @73 |~| @73 |~| @52|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @11 ! |~+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 *** ../vim-8.1.2286/src/testdir/dumps/Test_popupwin_08.dump 2019-06-08 19:00:58.069909734 +0200 --- src/testdir/dumps/Test_popupwin_08.dump 2019-11-10 17:12:04.887041585 +0100 *************** *** 1,10 **** >x+0&#ffffff0@2| @71 ! |~+0#4040ff13&| @73 |~| @73 |~| @73 |~| @73 |~| @73 |~| @73 |~| @73 ! | +0#0000000&@74 @57|1|,|1| @10|A|l@1| --- 1,10 ---- >x+0&#ffffff0@2| @71 ! |~+0&#e0e0e08| @73 |~| @73 |~| @73 |~| @73 |~| @73 |~| @73 |~| @73 ! | +0&#ffffff0@74 @57|1|,|1| @10|A|l@1| *** ../vim-8.1.2286/src/version.c 2019-11-10 15:16:51.522429491 +0100 --- src/version.c 2019-11-10 16:46:18.602668471 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 2287, /**/ -- Over the years, I've developed my sense of deja vu so acutely that now I can remember things that *have* happened before ... /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///