]> granicus.if.org Git - vim/commitdiff
patch 8.1.1811: popup window color cannot be set to "Normal" v8.1.1811
authorBram Moolenaar <Bram@vim.org>
Sun, 4 Aug 2019 16:13:46 +0000 (18:13 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 4 Aug 2019 16:13:46 +0000 (18:13 +0200)
Problem:    Popup window color cannot be set to "Normal".
Solution:   Check for non-empty 'wincolor' instead of zero attribute.
            (closes #4772)

src/screen.c
src/testdir/dumps/Test_popupwin_20.dump
src/testdir/dumps/Test_popupwin_21.dump
src/testdir/test_popupwin.vim
src/version.c

index 04d0e2ffcd902d7a1e8b2f9cb956006a498242f7..55437e14766074166456589d7946be09374c0b9d 100644 (file)
@@ -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;
index affe148cca0f602af4b2d63909e81bb69c1cf67b..2989cd1301ae43dba2c7bbc3c320e062c9c0c0c5 100644 (file)
@@ -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||
index 7c2718dde7d62a59b13daafa23e3a4ec31c8c9da..68594f98e6a3280872dab95e1593b271fb978779 100644 (file)
@@ -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|║
index 5a841e30ae580895a1518c5e95fc19e629fd31eb..8a5892670e62210c5eef1ef13adc18519fad5c32 100644 (file)
@@ -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]})
index 690448299ab273791a723cdc7e8a2496e4dbb678..32759b170951b8897de81b4557320dbca1b036af 100644 (file)
@@ -773,6 +773,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1811,
 /**/
     1810,
 /**/