summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-04 18:13:46 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-04 18:13:46 +0200
commitc363fe1599655232e8bd6e279fbf70d4c1b7baf6 (patch)
tree89f8de51fa679f8e0fb1660edabd848619d8698b
parentb8350abef0abbdca99bf08e821a8ba0ade37abed (diff)
patch 8.1.1811: popup window color cannot be set to "Normal"v8.1.1811
Problem: Popup window color cannot be set to "Normal". Solution: Check for non-empty 'wincolor' instead of zero attribute. (closes #4772)
-rw-r--r--src/screen.c8
-rw-r--r--src/testdir/dumps/Test_popupwin_20.dump10
-rw-r--r--src/testdir/dumps/Test_popupwin_21.dump10
-rw-r--r--src/testdir/test_popupwin.vim2
-rw-r--r--src/version.c2
5 files changed, 17 insertions, 15 deletions
diff --git a/src/screen.c b/src/screen.c
index 04d0e2ffcd..55437e1476 100644
--- 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
index affe148cca..2989cd1301 100644
--- 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
index 7c2718dde7..68594f98e6 100644
--- 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
index 5a841e30ae..8a5892670e 100644
--- 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
index 690448299a..32759b1709 100644
--- 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,