Patch 8.2.1004
Problem: Line numbers below filler lines not always updated.
Solution: Don't break out of the win_line() loop too early. (Christian
Brabandt, closes #6294, closes #6138)
Files: src/drawline.c, src/testdir/dumps/Test_diff_rnu_01.dump,
src/testdir/dumps/Test_diff_rnu_02.dump,
src/testdir/dumps/Test_diff_rnu_03.dump,
src/testdir/test_diffmode.vim
*** ../vim-8.2.1003/src/drawline.c 2020-06-10 14:16:30.098988403 +0200
--- src/drawline.c 2020-06-18 19:10:42.398263074 +0200
***************
*** 1287,1299 ****
// When still displaying '$' of change command, stop at cursor.
// When only displaying the (relative) line number and that's done,
// stop here.
! if ((dollar_vcol >= 0 && wp == curwin
! && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
#ifdef FEAT_DIFF
&& filler_todo <= 0
#endif
)
- || (number_only && draw_state > WL_NR))
{
screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
screen_line_flags);
--- 1287,1299 ----
// When still displaying '$' of change command, stop at cursor.
// When only displaying the (relative) line number and that's done,
// stop here.
! if (((dollar_vcol >= 0 && wp == curwin
! && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol)
! || (number_only && draw_state > WL_NR))
#ifdef FEAT_DIFF
&& filler_todo <= 0
#endif
)
{
screen_line(screen_row, wp->w_wincol, col, -(int)wp->w_width,
screen_line_flags);
*** ../vim-8.2.1003/src/testdir/dumps/Test_diff_rnu_01.dump 2020-06-18
19:14:09.501757494 +0200
--- src/testdir/dumps/Test_diff_rnu_01.dump 2020-06-18 19:10:42.398263074
+0200
***************
*** 0 ****
--- 1,20 ----
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&|1+0#af5f00255&|
@2>a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|1|
|a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|2|
|a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|x+2#0000000#ff404010| +0&#ffd7ff255@33||+1&#ffffff0|
+0#af5f00255&@1|3| |y+2#0000000#ff404010| +0&#ffd7ff255@31
+ | +0#0000e05#a8a8a8255@1|x+0#0000000#5fd7ff255| @33||+1&#ffffff0|
+0#af5f00255&@3|-+0#4040ff13#afffff255@32
+ | +0#0000e05#a8a8a8255@1|x+0#0000000#5fd7ff255| @33||+1&#ffffff0|
+0#af5f00255&@3|-+0#4040ff13#afffff255@32
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|4|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|5|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|6|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|7|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|8|
|b+0#0000000&| @31
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+3&&|N|o|
|N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1003/src/testdir/dumps/Test_diff_rnu_02.dump 2020-06-18
19:14:09.505757483 +0200
--- src/testdir/dumps/Test_diff_rnu_02.dump 2020-06-18 19:10:42.398263074
+0200
***************
*** 0 ****
--- 1,20 ----
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|1|
|a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&|2+0#af5f00255&|
@2>a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|1|
|a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|x+2#0000000#ff404010| +0&#ffd7ff255@33||+1&#ffffff0|
+0#af5f00255&@1|2| |y+2#0000000#ff404010| +0&#ffd7ff255@31
+ | +0#0000e05#a8a8a8255@1|x+0#0000000#5fd7ff255| @33||+1&#ffffff0|
+0#af5f00255&@3|-+0#4040ff13#afffff255@32
+ | +0#0000e05#a8a8a8255@1|x+0#0000000#5fd7ff255| @33||+1&#ffffff0|
+0#af5f00255&@3|-+0#4040ff13#afffff255@32
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|3|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|4|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|5|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|6|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|7|
|b+0#0000000&| @31
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|1| @11|A|l@1| |[+3&&|N|o|
|N|a|m|e|]| |[|+|]| @5|2|,|1| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1003/src/testdir/dumps/Test_diff_rnu_03.dump 2020-06-18
19:14:09.509757474 +0200
--- src/testdir/dumps/Test_diff_rnu_03.dump 2020-06-18 19:10:42.398263074
+0200
***************
*** 0 ****
--- 1,20 ----
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|2|
|a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|1|
|a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&|3+0#af5f00255&|
@2>a+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|x+2#0000000#ff404010| +0&#ffd7ff255@33||+1&#ffffff0|
+0#af5f00255&@1|1| |y+2#0000000#ff404010| +0&#ffd7ff255@31
+ | +0#0000e05#a8a8a8255@1|x+0#0000000#5fd7ff255| @33||+1&#ffffff0|
+0#af5f00255&@3|-+0#4040ff13#afffff255@32
+ | +0#0000e05#a8a8a8255@1|x+0#0000000#5fd7ff255| @33||+1&#ffffff0|
+0#af5f00255&@3|-+0#4040ff13#afffff255@32
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|2|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|3|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|4|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|5|
|b+0#0000000&| @31
+ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#af5f00255&@1|6|
|b+0#0000000&| @31
+ |~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1| |[+3&&|N|o|
|N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1
+ | +0&&@74
*** ../vim-8.2.1003/src/testdir/test_diffmode.vim 2020-04-08
21:50:18.872619665 +0200
--- src/testdir/test_diffmode.vim 2020-06-18 19:10:42.398263074 +0200
***************
*** 1093,1096 ****
--- 1093,1121 ----
%bwipe!
endfunc
+ func Test_diff_rnu()
+ CheckScreendump
+
+ let content =<< trim END
+ call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b'])
+ vnew
+ call setline(1, ['a', 'a', 'a', 'x', 'x', 'x', 'b', 'b', 'b', 'b', 'b'])
+ windo diffthis
+ setlocal number rnu foldcolumn=0
+ END
+ call writefile(content, 'Xtest_diff_rnu')
+ let buf = RunVimInTerminal('-S Xtest_diff_rnu', {})
+
+ call VerifyScreenDump(buf, 'Test_diff_rnu_01', {})
+
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_diff_rnu_02', {})
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_diff_rnu_03', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_rnu')
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.1003/src/version.c 2020-06-18 18:45:46.001900050 +0200
--- src/version.c 2020-06-18 19:12:10.346048315 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1004,
/**/
--
Mental Floss prevents moral decay!
/// 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/202006181716.05IHG9j7412457%40masaka.moolenaar.net.