Patch 9.0.0975
Problem:    Virtual text below an empty line is misplaced when 'number' is
            set.
Solution:   Adjust the computations. (closes #11629)
Files:      src/drawline.c, src/testdir/test_textprop.vim,
            src/testdir/dumps/Test_prop_below_after_empty_2.dump


*** ../vim-9.0.0974/src/drawline.c      2022-11-27 20:54:46.045949632 +0000
--- src/drawline.c      2022-11-29 21:29:30.574279404 +0000
***************
*** 663,671 ****
                before -= cells;
  
            // Below-align: empty line add one character
!           if (below && vcol == 0 && col_with_padding == 0
!                                                     && wp->w_width == before)
!               col_with_padding = 1;
  
            if (before < 0
                    || !(right || below)
--- 663,671 ----
                before -= cells;
  
            // Below-align: empty line add one character
!           if (below && vcol == 0 && col_with_padding == col_off
!                                           && wp->w_width - col_off == before)
!               col_with_padding += 1;
  
            if (before < 0
                    || !(right || below)
*** ../vim-9.0.0974/src/testdir/test_textprop.vim       2022-11-27 
20:54:46.049949634 +0000
--- src/testdir/test_textprop.vim       2022-11-29 21:20:32.082166240 +0000
***************
*** 2744,2749 ****
--- 2744,2752 ----
    let buf = RunVimInTerminal('-S XscriptPropBelowAfterEmpty', #{rows: 8, 
cols: 60})
    call VerifyScreenDump(buf, 'Test_prop_below_after_empty_1', {}) 
  
+   call term_sendkeys(buf, ":set number\<CR>")
+   call VerifyScreenDump(buf, 'Test_prop_below_after_empty_2', {}) 
+ 
    call StopVimInTerminal(buf)
  endfunc
  
*** ../vim-9.0.0974/src/testdir/dumps/Test_prop_below_after_empty_2.dump        
2022-11-29 21:35:51.302373129 +0000
--- src/testdir/dumps/Test_prop_below_after_empty_2.dump        2022-11-29 
21:30:18.214291890 +0000
***************
*** 0 ****
--- 1,8 ----
+ | +0#af5f00255#ffffff0@1|1| >v+0#0000000&|i|m|9|s|c|r|i|p|t| @45
+ | +0#af5f00255&@1|2| | +0#0000000&@55
+ | +0#af5f00255&@3| +0#0000000&|T+0#ffffff16#e000002|h|e| |q|u|i|c|k| 
|b|r|o|w|n| |f|o|x| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g| 
+0#0000000#ffffff0@11
+ | +0#af5f00255&@1|3| |t+0#0000000&|h|r|e@1| @50
+ | +0#af5f00255&@1|4| | +0#0000000&@55
+ | +0#af5f00255&@3|T+0#0000000#ffd7ff255|h|e| |s|l|o|w| |f|o|x| |b|u|m|p|s| 
|i|n|t|o| |t|h|e| |l|a|z|y| |d|o|g| +0&#ffffff0@19
+ |~+0#4040ff13&| @58
+ |:+0#0000000&|s|e|t| |n|u|m|b|e|r| @30|1|,|1| @10|A|l@1| 
*** ../vim-9.0.0974/src/version.c       2022-11-29 20:33:16.592850638 +0000
--- src/version.c       2022-11-29 21:22:07.070181165 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     975,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
180. You maintain more than six e-mail addresses.

 /// 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/20221129213748.86E221C2588%40moolenaar.net.

Raspunde prin e-mail lui