Patch 9.0.0201
Problem:    CursorLine highlight overrules virtual text highlight.
Solution:   Let extra attribute overrule line attribute. (closes #10909)
Files:      src/drawline.c, src/testdir/test_textprop.vim,
            src/testdir/dumps/Test_prop_with_text_after_nowrap_2.dump,
            src/testdir/dumps/Test_prop_with_text_after_nowrap_3.dump


*** ../vim-9.0.0200/src/drawline.c      2022-08-11 17:24:27.481795141 +0100
--- src/drawline.c      2022-08-13 20:16:04.899058217 +0100
***************
*** 1638,1644 ****
                                                       & TP_FLAG_ALIGN_BELOW)))
                              : bcol >= text_props[text_prop_next].tp_col - 1))
                {
!                   if (bcol <= text_props[text_prop_next].tp_col - 1
                                           + text_props[text_prop_next].tp_len)
                        text_prop_idxs[text_props_active++] = text_prop_next;
                    ++text_prop_next;
--- 1638,1645 ----
                                                       & TP_FLAG_ALIGN_BELOW)))
                              : bcol >= text_props[text_prop_next].tp_col - 1))
                {
!                   if (text_props[text_prop_next].tp_col == MAXCOL
!                           || bcol <= text_props[text_prop_next].tp_col - 1
                                           + text_props[text_prop_next].tp_len)
                        text_prop_idxs[text_props_active++] = text_prop_next;
                    ++text_prop_next;
***************
*** 2989,2995 ****
        {
  #ifdef LINE_ATTR
            if (line_attr)
!               wlv.char_attr = hl_combine_attr(extra_attr, line_attr);
            else
  #endif
                wlv.char_attr = extra_attr;
--- 2990,2996 ----
        {
  #ifdef LINE_ATTR
            if (line_attr)
!               wlv.char_attr = hl_combine_attr(line_attr, extra_attr);
            else
  #endif
                wlv.char_attr = extra_attr;
*** ../vim-9.0.0200/src/testdir/test_textprop.vim       2022-08-13 
19:34:46.363984053 +0100
--- src/testdir/test_textprop.vim       2022-08-13 20:06:53.084355376 +0100
***************
*** 2756,2767 ****
  
        call prop_add(3, 0, #{type: 'anotherprop', text: 'right aligned', 
text_align: 'right'})
        call prop_add(3, 0, #{type: 'anotherprop', text: 'also right aligned', 
text_align: 'right'})
    END
    call writefile(lines, 'XscriptPropsAfterNowrap')
    let buf = RunVimInTerminal('-S XscriptPropsAfterNowrap', #{rows: 12, cols: 
60})
    call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_1', {})
  
!   call term_sendkeys(buf, ":set signcolumn=yes foldcolumn=3\<CR>")
    call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_2', {})
  
    call term_sendkeys(buf, "j")
--- 2756,2768 ----
  
        call prop_add(3, 0, #{type: 'anotherprop', text: 'right aligned', 
text_align: 'right'})
        call prop_add(3, 0, #{type: 'anotherprop', text: 'also right aligned', 
text_align: 'right'})
+       hi CursorLine ctermbg=lightgrey
    END
    call writefile(lines, 'XscriptPropsAfterNowrap')
    let buf = RunVimInTerminal('-S XscriptPropsAfterNowrap', #{rows: 12, cols: 
60})
    call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_1', {})
  
!   call term_sendkeys(buf, ":set signcolumn=yes foldcolumn=3 cursorline\<CR>")
    call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_2', {})
  
    call term_sendkeys(buf, "j")
*** ../vim-9.0.0200/src/testdir/dumps/Test_prop_with_text_after_nowrap_2.dump   
2022-08-13 19:34:46.363984053 +0100
--- src/testdir/dumps/Test_prop_with_text_after_nowrap_2.dump   2022-08-13 
20:07:09.676309425 +0100
***************
*** 3,10 ****
  | +0#0000e05#a8a8a8255@4|t+0#0000000#ffffff0|w|o| @51
  | +0#0000e05#a8a8a8255@4|a+0#0000000#ffff4012|n|o|t|h|e|r| +0&#ffffff0@47
  | +0#0000e05#a8a8a8255@4|O+0#ffffff16#e000002|n|e| |M|o|r|e| |H|e|r|e| 
+0#0000000#ffffff0@41
! | +0#0000e05#a8a8a8255@4|t+0#0000000#ffffff0|h|r|e>e| 
@36|r+0&#ffff4012|i|g|h|t| |a|l|i|g|n|e|d
! | +0#0000e05#a8a8a8255@4| +0#0000000#ffffff0@36|a+0&#ffff4012|l|s|o| 
|r|i|g|h|t| |a|l|i|g|n|e|d
  | +0#0000e05#a8a8a8255@4|f+0#0000000#ffffff0|o|u|r| @50
  |~+0#4040ff13&| @58
  |~| @58
--- 3,10 ----
  | +0#0000e05#a8a8a8255@4|t+0#0000000#ffffff0|w|o| @51
  | +0#0000e05#a8a8a8255@4|a+0#0000000#ffff4012|n|o|t|h|e|r| +0&#ffffff0@47
  | +0#0000e05#a8a8a8255@4|O+0#ffffff16#e000002|n|e| |M|o|r|e| |H|e|r|e| 
+0#0000000#ffffff0@41
! | +0#0000e05#a8a8a8255@4|t+8#0000000#e0e0e08|h|r|e>e| 
@36|r+8&#ffff4012|i|g|h|t| |a|l|i|g|n|e|d
! | +0#0000e05#a8a8a8255@4| +8#0000000#e0e0e08@36|a+8&#ffff4012|l|s|o| 
|r|i|g|h|t| |a|l|i|g|n|e|d
  | +0#0000e05#a8a8a8255@4|f+0#0000000#ffffff0|o|u|r| @50
  |~+0#4040ff13&| @58
  |~| @58
*** ../vim-9.0.0200/src/testdir/dumps/Test_prop_with_text_after_nowrap_3.dump   
2022-08-13 19:34:46.363984053 +0100
--- src/testdir/dumps/Test_prop_with_text_after_nowrap_3.dump   2022-08-13 
20:07:10.836306236 +0100
***************
*** 5,12 ****
  | +0#0000e05#a8a8a8255@4|O+0#ffffff16#e000002|n|e| |M|o|r|e| |H|e|r|e| 
+0#0000000#ffffff0@41
  | +0#0000e05#a8a8a8255@4|t+0#0000000#ffffff0|h|r|e@1| 
@36|r+0&#ffff4012|i|g|h|t| |a|l|i|g|n|e|d
  | +0#0000e05#a8a8a8255@4| +0#0000000#ffffff0@36|a+0&#ffff4012|l|s|o| 
|r|i|g|h|t| |a|l|i|g|n|e|d
! | +0#0000e05#a8a8a8255@4|f+0#0000000#ffffff0|o|u>r| @50
! |~+0#4040ff13&| @58
  |~| @58
  |~| @58
  | +0#0000000&@41|4|,|4| @10|A|l@1| 
--- 5,12 ----
  | +0#0000e05#a8a8a8255@4|O+0#ffffff16#e000002|n|e| |M|o|r|e| |H|e|r|e| 
+0#0000000#ffffff0@41
  | +0#0000e05#a8a8a8255@4|t+0#0000000#ffffff0|h|r|e@1| 
@36|r+0&#ffff4012|i|g|h|t| |a|l|i|g|n|e|d
  | +0#0000e05#a8a8a8255@4| +0#0000000#ffffff0@36|a+0&#ffff4012|l|s|o| 
|r|i|g|h|t| |a|l|i|g|n|e|d
! | +0#0000e05#a8a8a8255@4|f+8#0000000#e0e0e08|o|u>r| @50
! |~+0#4040ff13#ffffff0| @58
  |~| @58
  |~| @58
  | +0#0000000&@41|4|,|4| @10|A|l@1| 
*** ../vim-9.0.0200/src/version.c       2022-08-13 19:34:46.363984053 +0100
--- src/version.c       2022-08-13 20:14:41.087232383 +0100
***************
*** 737,738 ****
--- 737,740 ----
  {   /* Add new patch number below this line */
+ /**/
+     201,
  /**/

-- 
Not too long ago, a keyboard was something to make music with...

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20220813191802.BE7C91C0D0A%40moolenaar.net.

Raspunde prin e-mail lui