# HG changeset patch # User Bram Moolenaar # Date 1564935305 -7200 # Node ID 6146b10714de5c7addf7ba238a8fd0b38ab96a8f # Parent cb9dd669cb7d7548eaeb966471cf71800330d649 patch 8.1.1811: popup window color cannot be set to "Normal" commit https://github.com/vim/vim/commit/c363fe1599655232e8bd6e279fbf70d4c1b7baf6 Author: Bram Moolenaar Date: Sun Aug 4 18:13:46 2019 +0200 patch 8.1.1811: popup window color cannot be set to "Normal" Problem: Popup window color cannot be set to "Normal". Solution: Check for non-empty 'wincolor' instead of zero attribute. (closes #4772) diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -995,7 +995,7 @@ get_wcr_attr(win_T *wp) 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) + else if (WIN_IS_POPUP(wp)) wcr_attr = HL_ATTR(HLF_PNI); #endif return wcr_attr; @@ -9210,8 +9210,8 @@ win_ins_lines( /* * 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. + * 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,7 +9241,7 @@ win_ins_lines( if (screen_ins_lines(0, W_WINROW(wp) + row, line_count, (int)Rows, 0, NULL) == FAIL) { - /* deletion will have messed up other windows */ + // deletion will have messed up other windows if (did_delete) { wp->w_redr_status = TRUE; diff --git a/src/testdir/dumps/Test_popupwin_20.dump b/src/testdir/dumps/Test_popupwin_20.dump --- a/src/testdir/dumps/Test_popupwin_20.dump +++ b/src/testdir/dumps/Test_popupwin_20.dump @@ -1,9 +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 +|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|| diff --git a/src/testdir/dumps/Test_popupwin_21.dump b/src/testdir/dumps/Test_popupwin_21.dump --- a/src/testdir/dumps/Test_popupwin_21.dump +++ b/src/testdir/dumps/Test_popupwin_21.dump @@ -1,9 +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 +|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|║ 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 @@ -86,7 +86,7 @@ func Test_popup_with_border_and_padding( 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('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]}) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -774,6 +774,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1811, +/**/ 1810, /**/ 1809,