Patch 9.0.0905
Problem:    Virtual text after the line wraps when 'wrap' is off.
Solution:   Only set text_prop_follows when wrapping. (closes #11463)
Files:      src/drawline.c, src/testdir/test_textprop.vim,
            src/testdir/dumps/Test_text_after_nowrap_list_1.dump


*** ../vim-9.0.0904/src/drawline.c      2022-11-17 14:55:40.594746960 +0000
--- src/drawline.c      2022-11-18 23:12:33.742209355 +0000
***************
*** 2043,2049 ****
                                    p_extra_free2 = wlv.p_extra;
                                }
  
!                               if (lcs_eol_one < 0 && wlv.col
                                               + wlv.n_extra - 2 > wp->w_width)
                                    // don't bail out at end of line
                                    text_prop_follows = TRUE;
--- 2043,2051 ----
                                    p_extra_free2 = wlv.p_extra;
                                }
  
!                               if (lcs_eol_one < 0
!                                       && wp->w_p_wrap
!                                       && wlv.col
                                               + wlv.n_extra - 2 > wp->w_width)
                                    // don't bail out at end of line
                                    text_prop_follows = TRUE;
*** ../vim-9.0.0904/src/testdir/test_textprop.vim       2022-11-17 
14:55:40.594746960 +0000
--- src/testdir/test_textprop.vim       2022-11-18 23:09:38.218382777 +0000
***************
*** 3393,3398 ****
--- 3393,3434 ----
    call StopVimInTerminal(buf)
  endfunc
  
+ func Test_text_after_nowrap_list()
+   CheckRunVimInTerminal
+ 
+   let lines =<< trim END
+       vim9script
+ 
+       set nowrap
+       set listchars+=extends:>
+       set list
+       setline(1, ['some text here', '', 'last line'])
+ 
+       prop_type_add('test', {highlight: 'DiffChange'})
+       prop_add(1, 0, {
+           type: 'test',
+           text: 'The quick brown fox jumps.',
+           text_padding_left: 2,
+       })
+       prop_add(1, 0, {
+           type: 'test',
+           text: '■ The fox jumps over the lazy dog.',
+           text_padding_left: 2,
+       })
+       prop_add(1, 0, {
+           type: 'test',
+           text: '■ The lazy dog.',
+           text_padding_left: 2,
+       })
+       normal 3G$
+   END
+   call writefile(lines, 'XTextAfterNowrapList', 'D')
+   let buf = RunVimInTerminal('-S XTextAfterNowrapList', #{rows: 6, cols: 60})
+   call VerifyScreenDump(buf, 'Test_text_after_nowrap_list_1', {})
+ 
+   call StopVimInTerminal(buf)
+ endfunc
+ 
  func Test_text_below_nowrap()
    CheckRunVimInTerminal
  
*** ../vim-9.0.0904/src/testdir/dumps/Test_text_after_nowrap_list_1.dump        
2022-11-18 23:13:09.666174536 +0000
--- src/testdir/dumps/Test_text_after_nowrap_list_1.dump        2022-11-18 
23:10:40.982320095 +0000
***************
*** 0 ****
--- 1,6 ----
+ |s+0&#ffffff0|o|m|e| |t|e|x|t| |h|e|r|e|$+0#4040ff13&| 
+0#0000000&@1|T+0&#ffd7ff255|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s|.| 
+0&#ffffff0@1|■+0&#ffd7ff255| |T|h|e| |f|o|x| |j|u|m|p|>+0#4040ff13#ffffff0
+ |$| +0#0000000&@58
+ |l|a|s|t| |l|i|n>e|$+0#4040ff13&| +0#0000000&@49
+ |~+0#4040ff13&| @58
+ |~| @58
+ | +0#0000000&@41|3|,|9| @10|A|l@1| 
*** ../vim-9.0.0904/src/version.c       2022-11-18 22:14:04.802988148 +0000
--- src/version.c       2022-11-18 23:04:50.134683684 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     905,
  /**/

-- 
>From "know your smileys":
 :-F    Bucktoothed vampire with one tooth missing

 /// 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/20221118231416.4619B1C0A23%40moolenaar.net.

Raspunde prin e-mail lui