Patch 8.2.3723
Problem:    When using 'linebreak' a text property starts too early.
Solution:   Decrement "bcol" when looking for property start. (closes #9242)
Files:      src/drawline.c, src/testdir/test_textprop.vim,
            src/testdir/dumps/Test_prop_after_linebreak.dump


*** ../vim-8.2.3722/src/drawline.c      2021-12-02 11:34:17.584819150 +0000
--- src/drawline.c      2021-12-02 19:45:22.987103396 +0000
***************
*** 1453,1458 ****
--- 1453,1463 ----
                    }
                }
  
+ # ifdef FEAT_LINEBREAK
+               if (n_extra > 0 && in_linebreak)
+                   // not on the next char yet, don't start another prop
+                   --bcol;
+ # endif
                // Add any text property that starts in this column.
                while (text_prop_next < text_prop_count
                           && bcol >= text_props[text_prop_next].tp_col - 1)
*** ../vim-8.2.3722/src/testdir/test_textprop.vim       2021-11-30 
20:21:25.657045218 +0000
--- src/testdir/test_textprop.vim       2021-12-02 19:44:09.919238770 +0000
***************
*** 1651,1656 ****
--- 1651,1674 ----
    call delete('XscriptPropAfterTab')
  endfunc
  
+ func Test_prop_after_linebreak()
+   CheckRunVimInTerminal
+ 
+   let lines =<< trim END
+       set linebreak wrap
+       call printf('%s+(%s)', 'x'->repeat(&columns / 2), 'x'->repeat(&columns 
/ 2))->setline(1)
+       call prop_type_add('test', #{highlight: 'ErrorMsg'})
+       call prop_add(1, (&columns / 2) + 2, #{length: 1, type: 'test'})
+   END
+   call writefile(lines, 'XscriptPropAfterLinebreak')
+   let buf = RunVimInTerminal('-S XscriptPropAfterLinebreak', #{rows: 10})
+   call TermWait(buf)
+   call VerifyScreenDump(buf, 'Test_prop_after_linebreak', {})
+ 
+   call StopVimInTerminal(buf)
+   call delete('XscriptPropAfterLinebreak')
+ endfunc
+ 
  " Buffer number of 0 should be ignored, as if the parameter wasn't passed.
  def Test_prop_bufnr_zero()
    new
*** ../vim-8.2.3722/src/testdir/dumps/Test_prop_after_linebreak.dump    
2021-12-02 19:46:20.507000936 +0000
--- src/testdir/dumps/Test_prop_after_linebreak.dump    2021-12-02 
19:44:12.583233727 +0000
***************
*** 0 ****
--- 1,10 ----
+ >x+0&#ffffff0@36|+| @36
+ |(+0#ffffff16#e000002|x+0#0000000#ffffff0@36|)| @35
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ | +0#0000000&@56|1|,|1| @10|A|l@1| 
*** ../vim-8.2.3722/src/version.c       2021-12-02 18:55:10.714678843 +0000
--- src/version.c       2021-12-02 19:37:48.552078492 +0000
***************
*** 755,756 ****
--- 755,758 ----
  {   /* Add new patch number below this line */
+ /**/
+     3723,
  /**/

-- 
CRONE:  Who sent you?
ARTHUR: The Knights Who Say GNU!
CRONE:  Aaaagh!  (she looks around in rear) No!  We have no licenses here.
           "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD

 /// 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/20211202194729.8F4401C28D5%40moolenaar.net.

Raspunde prin e-mail lui