To: vim_dev@googlegroups.com Subject: Patch 8.1.1811 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1811 Problem: Popup window color cannot be set to "Normal". Solution: Check for non-empty 'wincolor' instead of zero attribute. (closes #4772) Files: src/screen.c, src/testdir/test_popupwin.vim, src/testdir/dumps/Test_popupwin_20.dump, src/testdir/dumps/Test_popupwin_21.dump *** ../vim-8.1.1810/src/screen.c 2019-07-28 21:42:23.177406571 +0200 --- src/screen.c 2019-08-04 18:09:18.586065506 +0200 *************** *** 995,1001 **** if (*wp->w_p_wcr != NUL) wcr_attr = syn_name2attr(wp->w_p_wcr); #ifdef FEAT_TEXT_PROP ! if (WIN_IS_POPUP(wp) && wcr_attr == 0) wcr_attr = HL_ATTR(HLF_PNI); #endif return wcr_attr; --- 995,1001 ---- if (*wp->w_p_wcr != NUL) wcr_attr = syn_name2attr(wp->w_p_wcr); #ifdef FEAT_TEXT_PROP ! else if (WIN_IS_POPUP(wp)) wcr_attr = HL_ATTR(HLF_PNI); #endif return wcr_attr; *************** *** 9210,9217 **** /* * If there is a next window or a status line, we first try to delete the * lines at the bottom to avoid messing what is after the window. ! * If this fails and there are following windows, don't do anything to avoid ! * messing up those windows, better just redraw. */ did_delete = FALSE; if (wp->w_next != NULL || wp->w_status_height) --- 9210,9217 ---- /* * If there is a next window or a status line, we first try to delete the * lines at the bottom to avoid messing what is after the window. ! * If this fails and there are following windows, don't do anything to ! * avoid messing up those windows, better just redraw. */ did_delete = FALSE; if (wp->w_next != NULL || wp->w_status_height) *************** *** 9241,9247 **** if (screen_ins_lines(0, W_WINROW(wp) + row, line_count, (int)Rows, 0, NULL) == FAIL) { ! /* deletion will have messed up other windows */ if (did_delete) { wp->w_redr_status = TRUE; --- 9241,9247 ---- if (screen_ins_lines(0, W_WINROW(wp) + row, line_count, (int)Rows, 0, NULL) == FAIL) { ! // deletion will have messed up other windows if (did_delete) { wp->w_redr_status = TRUE; *** ../vim-8.1.1810/src/testdir/test_popupwin.vim 2019-08-04 17:59:46.428829920 +0200 --- src/testdir/test_popupwin.vim 2019-08-04 18:10:11.549439241 +0200 *************** *** 86,92 **** call setline(1, range(1, 100)) call popup_create('hello border', #{line: 2, col: 3, border: []}) call popup_create('hello padding', #{line: 2, col: 23, padding: []}) ! call popup_create('hello both', #{line: 2, col: 43, border: [], padding: []}) call popup_create('border TL', #{line: 6, col: 3, border: [1, 0, 0, 4]}) call popup_create('paddings', #{line: 6, col: 23, padding: [1, 3, 2, 4]}) call popup_create('wrapped longer text', #{line: 8, col: 55, padding: [0, 3, 0, 3], border: [0, 1, 0, 1]}) --- 86,92 ---- call setline(1, range(1, 100)) call popup_create('hello border', #{line: 2, col: 3, border: []}) call popup_create('hello padding', #{line: 2, col: 23, padding: []}) ! call popup_create('hello both', #{line: 2, col: 43, border: [], padding: [], highlight: 'Normal'}) call popup_create('border TL', #{line: 6, col: 3, border: [1, 0, 0, 4]}) call popup_create('paddings', #{line: 6, col: 23, padding: [1, 3, 2, 4]}) call popup_create('wrapped longer text', #{line: 8, col: 55, padding: [0, 3, 0, 3], border: [0, 1, 0, 1]}) *** ../vim-8.1.1810/src/testdir/dumps/Test_popupwin_20.dump 2019-07-30 21:19:21.880063009 +0200 --- src/testdir/dumps/Test_popupwin_20.dump 2019-08-04 18:10:23.693300344 +0200 *************** *** 1,9 **** >1+0&#ffffff0| @73 ! |2| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@18 ! |3| ||+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r||| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4||+0#0000001#ffd7ff255| @11||| +0#0000000#ffffff0@18 ! |4| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4||+0#0000001#ffd7ff255| |h|e|l@1|o| |b|o|t|h| ||| +0#0000000#ffffff0@18 ! |5| @40||+0#0000001#ffd7ff255| @11||| +0#0000000#ffffff0@18 ! |6| |++0#0000001#ffd7ff255|-@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@18 |7| ||+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37 |8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2|| |9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|x|t| @17|| --- 1,9 ---- >1+0&#ffffff0| @73 ! |2| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|+|-@11|+| @18 ! |3| ||+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r||| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4||| @11||| @18 ! |4| |++0#0000001#ffd7ff255|-@11|+| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4||| |h|e|l@1|o| |b|o|t|h| ||| @18 ! |5| @40||| @11||| @18 ! |6| |++0#0000001#ffd7ff255|-@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|+|-@11|+| @18 |7| ||+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37 |8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2|| |9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12||+0#0000001#ffd7ff255| @2|x|t| @17|| *** ../vim-8.1.1810/src/testdir/dumps/Test_popupwin_21.dump 2019-07-30 21:19:21.880063009 +0200 --- src/testdir/dumps/Test_popupwin_21.dump 2019-08-04 18:10:24.805287712 +0200 *************** *** 1,9 **** >1+0&#ffffff0| @73 ! |2| |╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@18 ! |3| |║+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r|║| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@18 ! |4| |╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|║+0#0000001#ffd7ff255| |h|e|l@1|o| |b|o|t|h| |║| +0#0000000#ffffff0@18 ! |5| @40|║+0#0000001#ffd7ff255| @11|║| +0#0000000#ffffff0@18 ! |6| |╔+0#0000001#ffd7ff255|═@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@18 |7| |║+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37 |8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2|║ |9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|x|t| @17|║ --- 1,9 ---- >1+0&#ffffff0| @73 ! |2| |╔+0#0000001#ffd7ff255|═@11|╗| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╔|═@11|╗| @18 ! |3| |║+0#0000001#ffd7ff255|h|e|l@1|o| |b|o|r|d|e|r|║| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255|h|e|l@1|o| |p|a|d@1|i|n|g| | +0#0000000#ffffff0@4|║| @11|║| @18 ! |4| |╚+0#0000001#ffd7ff255|═@11|╝| +0#0000000#ffffff0@5| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|║| |h|e|l@1|o| |b|o|t|h| |║| @18 ! |5| @40|║| @11|║| @18 ! |6| |╔+0#0000001#ffd7ff255|═@8| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@4|╚|═@11|╝| @18 |7| |║+0#0000001#ffd7ff255|b|o|r|d|e|r| |T|L| +0#0000000#ffffff0@9| +0#0000001#ffd7ff255@3|p|a|d@1|i|n|g|s| @2| +0#0000000#ffffff0@37 |8| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|w|r|a|p@1|e|d| |l|o|n|g|e|r| |t|e| @2|║ |9+0#0000000#ffffff0| @20| +0#0000001#ffd7ff255@14| +0#0000000#ffffff0@12|║+0#0000001#ffd7ff255| @2|x|t| @17|║ *** ../vim-8.1.1810/src/version.c 2019-08-04 17:59:46.428829920 +0200 --- src/version.c 2019-08-04 18:11:40.016463943 +0200 *************** *** 775,776 **** --- 775,778 ---- { /* Add new patch number below this line */ + /**/ + 1811, /**/ -- Far back in the mists of ancient time, in the great and glorious days of the former Galactic Empire, life was wild, rich and largely tax free. Mighty starships plied their way between exotic suns, seeking adventure and reward among the furthest reaches of Galactic space. In those days, spirits were brave, the stakes were high, men were real men, women were real women and small furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri. And all dared to brave unknown terrors, to do mighty deeds, to boldly split infinitives that no man had split before -- and thus was the Empire forged. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// 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 ///