Patch 8.1.2241
Problem:    Match highlight does not combine with 'wincolor'.
Solution:   Apply 'wincolor' last on top of any other attribute. (closes #5159)
Files:      src/drawline.c, src/testdir/test_popupwin.vim,
            src/testdir/dumps/Test_popupwin_matches.dump
            src/testdir/dumps/Test_popupwin_menu_01.dump
            src/testdir/dumps/Test_popupwin_menu_02.dump
            src/testdir/dumps/Test_popupwin_menu_04.dump


*** ../vim-8.1.2240/src/drawline.c      2019-10-27 22:54:24.583870611 +0100
--- src/drawline.c      2019-11-02 21:56:13.155285997 +0100
***************
*** 751,758 ****
        win_attr = wcr_attr;
        area_highlighting = TRUE;
      }
-     if (vi_attr != 0 && win_attr != 0)
-       vi_attr = hl_combine_attr(win_attr, vi_attr);
  
  #ifdef FEAT_TEXT_PROP
      if (WIN_IS_POPUP(wp))
--- 751,756 ----
***************
*** 1444,1453 ****
                        prev_syntax_attr = syntax_attr;
                    }
  
-                   // combine syntax attribute with 'wincolor'
-                   if (syntax_attr != 0 && win_attr != 0)
-                       syntax_attr = hl_combine_attr(win_attr, syntax_attr);
- 
                    if (did_emsg)
                    {
                        wp->w_s->b_syn_error = TRUE;
--- 1442,1447 ----
***************
*** 1548,1555 ****
  #endif
            }
        }
!       if (char_attr == 0)
!           char_attr = win_attr;
  
        // Get the next character to put on the screen.
  
--- 1542,1556 ----
  #endif
            }
        }
! 
!       // combine attribute with 'wincolor'
!       if (win_attr != 0)
!       {
!           if (char_attr == 0)
!               char_attr = win_attr;
!           else
!               char_attr = hl_combine_attr(win_attr, char_attr);
!       }
  
        // Get the next character to put on the screen.
  
***************
*** 3140,3143 ****
      vim_free(p_extra_free);
      return row;
  }
- 
--- 3141,3143 ----
*** ../vim-8.1.2240/src/testdir/test_popupwin.vim       2019-11-02 
20:21:02.467050123 +0100
--- src/testdir/test_popupwin.vim       2019-11-02 21:53:03.320115724 +0100
***************
*** 249,259 ****
            \ '444 555 666',
            \], #{line: 3, col: 10, border: []})
        set hlsearch
        /666
        call matchadd('ErrorMsg', '111')
!       call matchadd('ErrorMsg', '444')
        call win_execute(winid, "call matchadd('ErrorMsg', '111')")
!       call win_execute(winid, "call matchadd('ErrorMsg', '555')")
    END
    call writefile(lines, 'XtestPopupMatches')
    let buf = RunVimInTerminal('-S XtestPopupMatches', #{rows: 10})
--- 249,260 ----
            \ '444 555 666',
            \], #{line: 3, col: 10, border: []})
        set hlsearch
+       hi VeryBlue ctermfg=blue guifg=blue
        /666
        call matchadd('ErrorMsg', '111')
!       call matchadd('VeryBlue', '444')
        call win_execute(winid, "call matchadd('ErrorMsg', '111')")
!       call win_execute(winid, "call matchadd('VeryBlue', '555')")
    END
    call writefile(lines, 'XtestPopupMatches')
    let buf = RunVimInTerminal('-S XtestPopupMatches', #{rows: 10})
*** ../vim-8.1.2240/src/testdir/dumps/Test_popupwin_matches.dump        
2019-06-09 18:04:09.839426999 +0200
--- src/testdir/dumps/Test_popupwin_matches.dump        2019-11-02 
21:53:36.115992657 +0100
***************
*** 1,8 ****
  |1+0#ffffff16#e000002@2| +0#0000000#ffffff0|2@2| |3@2| @63
! >4+0#ffffff16#e000002@2| +0#0000000#ffffff0|5@2| |6+0&#ffff4012@2| 
+0&#ffffff0@63
  |~+0#4040ff13&| @7|╔+0#0000001#ffd7ff255|═@10|╗| +0#4040ff13#ffffff0@52
  |~| @7|║+0#0000001#ffd7ff255|1+0#ffffff16#e000002@2| 
+0#0000001#ffd7ff255|2@2| |3@2|║| +0#4040ff13#ffffff0@52
! |~| @7|║+0#0000001#ffd7ff255|4@2| |5+0#ffffff16#e000002@2| 
+0#0000001#ffd7ff255|6@2|║| +0#4040ff13#ffffff0@52
  |~| @7|╚+0#0000001#ffd7ff255|═@10|╝| +0#4040ff13#ffffff0@52
  |~| @73
  |~| @73
--- 1,8 ----
  |1+0#ffffff16#e000002@2| +0#0000000#ffffff0|2@2| |3@2| @63
! >4+0#4040ff13&@2| +0#0000000&|5@2| |6+0&#ffff4012@2| +0&#ffffff0@63
  |~+0#4040ff13&| @7|╔+0#0000001#ffd7ff255|═@10|╗| +0#4040ff13#ffffff0@52
  |~| @7|║+0#0000001#ffd7ff255|1+0#ffffff16#e000002@2| 
+0#0000001#ffd7ff255|2@2| |3@2|║| +0#4040ff13#ffffff0@52
! |~| @7|║+0#0000001#ffd7ff255|4@2| |5+0#4040ff13&@2| +0#0000001&|6@2|║| 
+0#4040ff13#ffffff0@52
  |~| @7|╚+0#0000001#ffd7ff255|═@10|╝| +0#4040ff13#ffffff0@52
  |~| @73
  |~| @73
*** ../vim-8.1.2240/src/testdir/dumps/Test_popupwin_menu_01.dump        
2019-07-20 16:51:14.343605469 +0200
--- src/testdir/dumps/Test_popupwin_menu_01.dump        2019-11-02 
21:47:05.421460372 +0100
***************
*** 1,7 ****
  >1+0&#ffffff0| @73
  |2| @73
  |3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| 
|l|i|s|t| |╗| +0#0000000#ffffff0@21
! |4| @20|║+0#0000001#ffd7ff255| |o+0#0000000#5fd7ff255|n|e| +0#0000001&@23| 
+0&#ffd7ff255|║| +0#0000000#ffffff0@21
  |5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
  |6| @20|║+0#0000001#ffd7ff255| |a|n|o|t|h|e|r| @20|║| +0#0000000#ffffff0@21
  |7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
--- 1,7 ----
  >1+0&#ffffff0| @73
  |2| @73
  |3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| 
|l|i|s|t| |╗| +0#0000000#ffffff0@21
! |4| @20|║+0#0000001#ffd7ff255| |o+0&#5fd7ff255|n|e| @23| +0&#ffd7ff255|║| 
+0#0000000#ffffff0@21
  |5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
  |6| @20|║+0#0000001#ffd7ff255| |a|n|o|t|h|e|r| @20|║| +0#0000000#ffffff0@21
  |7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
*** ../vim-8.1.2240/src/testdir/dumps/Test_popupwin_menu_02.dump        
2019-07-20 16:51:14.343605469 +0200
--- src/testdir/dumps/Test_popupwin_menu_02.dump        2019-11-02 
21:47:06.477456401 +0100
***************
*** 3,9 ****
  |3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| 
|l|i|s|t| |╗| +0#0000000#ffffff0@21
  |4| @20|║+0#0000001#ffd7ff255| |o|n|e| @24|║| +0#0000000#ffffff0@21
  |5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
! |6| @20|║+0#0000001#ffd7ff255| |a+0#0000000#5fd7ff255|n|o|t|h|e|r| 
+0#0000001&@19| +0&#ffd7ff255|║| +0#0000000#ffffff0@21
  |7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
  |8| @73
  |9| @73
--- 3,9 ----
  |3| @20|╔+0#0000001#ffd7ff255| |m|a|k|e| |a| |c|h|o|i|c|e| |f|r|o|m| |t|h|e| 
|l|i|s|t| |╗| +0#0000000#ffffff0@21
  |4| @20|║+0#0000001#ffd7ff255| |o|n|e| @24|║| +0#0000000#ffffff0@21
  |5| @20|║+0#0000001#ffd7ff255| |t|w|o| @24|║| +0#0000000#ffffff0@21
! |6| @20|║+0#0000001#ffd7ff255| |a+0&#5fd7ff255|n|o|t|h|e|r| @19| 
+0&#ffd7ff255|║| +0#0000000#ffffff0@21
  |7| @20|╚+0#0000001#ffd7ff255|═@28|╝| +0#0000000#ffffff0@21
  |8| @73
  |9| @73
*** ../vim-8.1.2240/src/testdir/dumps/Test_popupwin_menu_04.dump        
2019-07-20 16:51:14.343605469 +0200
--- src/testdir/dumps/Test_popupwin_menu_04.dump        2019-11-02 
21:47:00.161480162 +0100
***************
*** 1,7 ****
  >1+0&#ffffff0| @73
  |2| @73
  |3| @31|╔+0#0000001#ffd7ff255|═@6|╗| +0#0000000#ffffff0@32
! |4| @31|║+0#0000001#ffd7ff255| |o+0#0000000#40ff4011|n|e| +0#0000001&@1| 
+0&#ffd7ff255|║| +0#0000000#ffffff0@32
  |5| @31|║+0#0000001#ffd7ff255| |t|w|o| @2|║| +0#0000000#ffffff0@32
  |6| @31|║+0#0000001#ffd7ff255| |t|h|r|e@1| |║| +0#0000000#ffffff0@32
  |7| @31|╚+0#0000001#ffd7ff255|═@6|╝| +0#0000000#ffffff0@32
--- 1,7 ----
  >1+0&#ffffff0| @73
  |2| @73
  |3| @31|╔+0#0000001#ffd7ff255|═@6|╗| +0#0000000#ffffff0@32
! |4| @31|║+0#0000001#ffd7ff255| |o+0&#40ff4011|n|e| @1| +0&#ffd7ff255|║| 
+0#0000000#ffffff0@32
  |5| @31|║+0#0000001#ffd7ff255| |t|w|o| @2|║| +0#0000000#ffffff0@32
  |6| @31|║+0#0000001#ffd7ff255| |t|h|r|e@1| |║| +0#0000000#ffffff0@32
  |7| @31|╚+0#0000001#ffd7ff255|═@6|╝| +0#0000000#ffffff0@32
*** ../vim-8.1.2240/src/version.c       2019-11-02 20:21:02.471050131 +0100
--- src/version.c       2019-11-02 21:59:48.190120731 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     2241,
  /**/

-- 
For a moment, nothing happened.
Then, after a second or so, nothing continued to happen.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201911022101.xA2L19NF010963%40masaka.moolenaar.net.

Raspunde prin e-mail lui