Patch 9.0.1226
Problem:    Spurious empty line when using text propertie and virtual text.
Solution:   Do not set "text_prop_follows" when the other text property is not
            virtual text. (closes #11846)
Files:      src/drawline.c, src/testdir/test_textprop.vim,
            src/testdir/dumps/Test_textprop_nesting.dump


*** ../vim-9.0.1225/src/drawline.c      2023-01-04 11:15:07.493007440 +0000
--- src/drawline.c      2023-01-21 15:45:07.218173167 +0000
***************
*** 2016,2022 ****
                            text_prop_type = pt;
                            text_prop_attr =
                                   hl_combine_attr(text_prop_attr, used_attr);
!                           other_tpi = used_tpi;
                            text_prop_flags = pt->pt_flags;
                            text_prop_id = tp->tp_id;
                            used_tpi = tpi;
--- 2016,2023 ----
                            text_prop_type = pt;
                            text_prop_attr =
                                   hl_combine_attr(text_prop_attr, used_attr);
!                           if (used_tpi >= 0 && text_props[used_tpi].tp_id < 0)
!                               other_tpi = used_tpi;
                            text_prop_flags = pt->pt_flags;
                            text_prop_id = tp->tp_id;
                            used_tpi = tpi;
*** ../vim-9.0.1225/src/testdir/test_textprop.vim       2023-01-01 
14:04:47.863216040 +0000
--- src/testdir/test_textprop.vim       2023-01-21 15:51:57.670444355 +0000
***************
*** 1342,1353 ****
         call prop_add(1, 2, {'length': 3, 'type': 'search'})
         call prop_add(2, 3, {'length': 3, 'type': 'search'})
    END
!   call writefile(lines, 'XtestPropTab', 'D')
!   let buf = RunVimInTerminal('-S XtestPropTab', {'rows': 6})
    call VerifyScreenDump(buf, 'Test_textprop_tab', {})
  
    " clean up
    call StopVimInTerminal(buf)
  endfunc
  
  func Test_textprop_nowrap_scrolled()
--- 1342,1378 ----
         call prop_add(1, 2, {'length': 3, 'type': 'search'})
         call prop_add(2, 3, {'length': 3, 'type': 'search'})
    END
!   call writefile(lines, 'XtextPropTab', 'D')
!   let buf = RunVimInTerminal('-S XtextPropTab', {'rows': 6})
    call VerifyScreenDump(buf, 'Test_textprop_tab', {})
  
    " clean up
    call StopVimInTerminal(buf)
+ endfunc
+ 
+ func Test_textprop_nesting()
+   CheckScreendump
+ 
+   let lines =<< trim END
+       vim9script
+       var lines =<< trim LINESEND
+ 
+           const func: func.IFunction = ({
+               setLoading
+             }) => {
+       LINESEND
+       setline(1, lines)
+       prop_type_add('prop_add_test', {highlight: "ErrorMsg"})
+       prop_add(2, 31, {type: 'prop_add_test', end_lnum: 4, end_col: 2})
+       var text = 'text long enough to wrap line, text long enough to wrap 
line, text long enough to wrap line...'
+       prop_add(2, 0, {type: 'prop_add_test', text_wrap: 'truncate', 
text_align: 'after', text: text})
+   END
+   call writefile(lines, 'XtextpropNesting', 'D')
+   let buf = RunVimInTerminal('-S XtextpropNesting', {'rows': 8})
+   call VerifyScreenDump(buf, 'Test_textprop_nesting', {})
+ 
+   " clean up
+   call StopVimInTerminal(buf)
  endfunc
  
  func Test_textprop_nowrap_scrolled()
*** ../vim-9.0.1225/src/testdir/dumps/Test_textprop_nesting.dump        
2023-01-21 15:54:19.238532729 +0000
--- src/testdir/dumps/Test_textprop_nesting.dump        2023-01-21 
15:52:08.162450977 +0000
***************
*** 0 ****
--- 1,8 ----
+ > +0&#ffffff0@74
+ |c|o|n|s|t| |f|u|n|c|:| |f|u|n|c|.|I|F|u|n|c|t|i|o|n| |=| 
|(|{+0#ffffff16#e000002|t|e|x|t| |l|o|n|g| |e|n|o|u|g|h| |t|o| |w|r|a|p| 
|l|i|n|e|,| |t|e|x|t| |l|o|n|g| |e|n|…
+ | @3|s|e|t|L|o|a|d|i|n|g| +0#0000000#ffffff0@60
+ | +0#ffffff16#e000002| +0#0000000#ffffff0|}|)| |=|>| |{| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ | +0#0000000&@56|1|,|0|-|1| @8|A|l@1| 
*** ../vim-9.0.1225/src/version.c       2023-01-21 13:09:15.586541088 +0000
--- src/version.c       2023-01-21 15:41:04.397994435 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1226,
  /**/

-- 
To define recursion, we must first define recursion.

 /// 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/20230121155523.A651A1C03AF%40moolenaar.net.

Raspunde prin e-mail lui