Patch 8.1.1340
Problem:    Attributes from 'cursorline' overwrite textprop.
Solution:   Combine the attributes. (closes #3912)
Files:      src/screen.c, src/textprop.c, src/testdir/test_textprop.vim,
            src/testdir/dumps/Test_textprop_01.dump


*** ../vim-8.1.1339/src/screen.c        2019-05-17 12:31:40.266679824 +0200
--- src/screen.c        2019-05-17 13:04:04.624094164 +0200
***************
*** 4306,4316 ****
                char_attr = hl_combine_attr(line_attr, area_attr);
            else if (search_attr != 0)
                char_attr = hl_combine_attr(line_attr, search_attr);
!               /* Use line_attr when not in the Visual or 'incsearch' area
!                * (area_attr may be 0 when "noinvcur" is set). */
            else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
                                || vcol < fromcol || vcol_prev < fromcol_prev
                                || vcol >= tocol))
                char_attr = line_attr;
  #else
            if (area_attr != 0)
--- 4306,4320 ----
                char_attr = hl_combine_attr(line_attr, area_attr);
            else if (search_attr != 0)
                char_attr = hl_combine_attr(line_attr, search_attr);
! # ifdef FEAT_TEXT_PROP
!           else if (text_prop_type != NULL)
!               char_attr = hl_combine_attr(line_attr, text_prop_attr);
! # endif
            else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
                                || vcol < fromcol || vcol_prev < fromcol_prev
                                || vcol >= tocol))
+               // Use line_attr when not in the Visual or 'incsearch' area
+               // (area_attr may be 0 when "noinvcur" is set).
                char_attr = line_attr;
  #else
            if (area_attr != 0)
*** ../vim-8.1.1339/src/textprop.c      2019-05-17 11:08:52.877906342 +0200
--- src/textprop.c      2019-05-17 12:59:24.725606396 +0200
***************
*** 11,20 ****
   * Text properties implementation.  See ":help text-properties".
   *
   * TODO:
-  * - When using 'cursorline' attributes should be merged. (#3912)
   * - Adjust text property column and length when text is inserted/deleted.
-  *   -> splitting a line can create a zero-length property.  Don't highlight 
it
-  *      and extend it when inserting text.
   *   -> a :substitute with a multi-line match
   *   -> join two lines, also with BS in Insert mode
   *   -> search for changed_bytes() from misc1.c
--- 11,17 ----
*** ../vim-8.1.1339/src/testdir/test_textprop.vim       2019-05-17 
11:08:52.877906342 +0200
--- src/testdir/test_textprop.vim       2019-05-17 13:01:44.488856078 +0200
***************
*** 645,651 ****
        \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
        \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
        \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
!       \ "set number",
        \ "hi clear SpellBad",
        \ "set spell",
        \ "syn match Comment '//.*'",
--- 645,651 ----
        \ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
        \ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
        \ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
!       \ "set number cursorline",
        \ "hi clear SpellBad",
        \ "set spell",
        \ "syn match Comment '//.*'",
*** ../vim-8.1.1339/src/testdir/dumps/Test_textprop_01.dump     2019-05-05 
16:10:28.730247307 +0200
--- src/testdir/dumps/Test_textprop_01.dump     2019-05-17 13:01:53.440807682 
+0200
***************
*** 1,6 ****
  | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| 
+0&#ffffff0@63
  | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| 
+0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
! | +0#af5f00255&@1|3| 
>-+0#0000000#ffff4012|x+0&#ffffff0|a+0#4040ff13&@1|x+0#0000000&|-@1|x+0#4040ff13&|b@1|x+0#0000000&|-@1|x|c+0#4040ff13&@1|x|-+0#0000000&@1|x+0#4040ff13&|d@1|x|-+0#0000000&@1|
 @45
  | +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| 
|e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
  |~+0#4040ff13&| @73
  |~| @73
--- 1,6 ----
  | +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| 
+0&#ffffff0@63
  | +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| 
+0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
! | +0#af5f00255&@1|3| 
>-+8#0000000#ffff4012|x+8&#ffffff0|a+8#4040ff13&@1|x+8#0000000&|-@1|x+8#4040ff13&|b@1|x+8#0000000&|-@1|x|c+8#4040ff13&@1|x|-+8#0000000&@1|x+8#4040ff13&|d@1|x|-+8#0000000&@1|
 @45
  | +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| 
|e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
  |~+0#4040ff13&| @73
  |~| @73
*** ../vim-8.1.1339/src/version.c       2019-05-17 12:36:52.776893221 +0200
--- src/version.c       2019-05-17 13:03:35.072255505 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1340,
  /**/

-- 
Scientists decoded the first message from an alien civilization:
        SIMPLY SEND 6 TIMES 10 TO THE 50 ATOMS OF HYDROGEN TO THE STAR
SYSTEM AT THE TOP OF THE LIST, CROSS OFF THAT STAR SYSTEM, THEN PUT
YOUR STAR SYSTEM AT THE BOTTOM OF THE LIST AND SEND IT TO 100 OTHER
STAR SYSTEMS.  WITHIN ONE TENTH GALACTIC ROTATION YOU WILL RECEIVE
ENOUGH HYDROGREN TO POWER YOUR CIVILIZATION UNTIL ENTROPY REACHES ITS
MAXIMUM!  IT REALLY WORKS!

 /// 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/201905171105.x4HB5NmL004573%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui