Patch 9.0.0677

5 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 6, 2022, 2:23:49 PM10/6/22
to vim...@googlegroups.com

Patch 9.0.0677
Problem: Breakindent test accepts wrong result.
Solution: Fix the number column and adjust the expected text.
Files: src/drawline.c, src/testdir/test_breakindent.vim


*** ../vim-9.0.0676/src/drawline.c 2022-10-04 22:40:34.032508860 +0100
--- src/drawline.c 2022-10-06 18:56:02.226148773 +0100
***************
*** 343,351 ****
int num_attr UNUSED)
{
if ((wp->w_p_nu || wp->w_p_rnu)
! && ((wlv->row == wlv->startrow + wlv->filler_lines
! && (wp->w_skipcol == 0 || wlv->row > wp->w_winrow))
! || vim_strchr(p_cpo, CPO_NUMCOL) == NULL))
{
#ifdef FEAT_SIGNS
// If 'signcolumn' is set to 'number' and a sign is present
--- 343,350 ----
int num_attr UNUSED)
{
if ((wp->w_p_nu || wp->w_p_rnu)
! && (wlv->row == wlv->startrow + wlv->filler_lines
! || vim_strchr(p_cpo, CPO_NUMCOL) == NULL))
{
#ifdef FEAT_SIGNS
// If 'signcolumn' is set to 'number' and a sign is present
***************
*** 363,369 ****
#ifdef FEAT_PROP_POPUP
+ wlv->text_prop_above_count
#endif
! )
{
long num;
char *fmt = "%*ld ";
--- 362,368 ----
#ifdef FEAT_PROP_POPUP
+ wlv->text_prop_above_count
#endif
! && (wp->w_skipcol == 0 || wlv->row > wp->w_winrow))
{
long num;
char *fmt = "%*ld ";
*** ../vim-9.0.0676/src/testdir/test_breakindent.vim 2022-10-03 22:10:32.599683973 +0100
--- src/testdir/test_breakindent.vim 2022-10-06 19:07:01.076607893 +0100
***************
*** 671,684 ****
func Test_breakindent20_cpo_n_nextpage()
let s:input = ""
call s:test_windows('setl breakindent briopt=min:14 cpo+=n number')
! call setline(1, repeat('a', 200))
norm! 1gg
redraw!
let lines = s:screen_lines(1, 20)
let expect = [
! \ " 1 aaaaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaaaa",
\ ]
call s:compare_lines(expect, lines)
" Scroll down one screen line
--- 671,684 ----
func Test_breakindent20_cpo_n_nextpage()
let s:input = ""
call s:test_windows('setl breakindent briopt=min:14 cpo+=n number')
! call setline(1, repeat('abcdefghijklmnopqrst', 10))
norm! 1gg
redraw!
let lines = s:screen_lines(1, 20)
let expect = [
! \ " 1 abcdefghijklmnop",
! \ " qrstabcdefghijkl",
! \ " mnopqrstabcdefgh",
\ ]
call s:compare_lines(expect, lines)
" Scroll down one screen line
***************
*** 686,696 ****
norm! 5gj
redraw!
let lines = s:screen_lines(1, 20)
- " FIXME: this is not the right result
let expect = [
! \ "<<<aaaaaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaaaa",
\ ]
call s:compare_lines(expect, lines)

--- 686,695 ----
norm! 5gj
redraw!
let lines = s:screen_lines(1, 20)
let expect = [
! \ "<<< qrstabcdefghijkl",
! \ " mnopqrstabcdefgh",
! \ " ijklmnopqrstabcd",
\ ]
call s:compare_lines(expect, lines)

***************
*** 698,716 ****
norm! 1gg
let lines = s:screen_lines(1, 20)
let expect = [
! \ " 1 aaaaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaa",
\ ]
call s:compare_lines(expect, lines)
" Scroll down one screen line
norm! 5gj
let lines = s:screen_lines(1, 20)
- " FIXME: this is not the right result
let expect = [
! \ "<<<aaaaaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaa",
! \ " aaaaaaaaaaaaaa",
\ ]
call s:compare_lines(expect, lines)

--- 697,714 ----
norm! 1gg
let lines = s:screen_lines(1, 20)
let expect = [
! \ " 1 abcdefghijklmnop",
! \ " qrstabcdefghij",
! \ " klmnopqrstabcd",
\ ]
call s:compare_lines(expect, lines)
" Scroll down one screen line
norm! 5gj
let lines = s:screen_lines(1, 20)
let expect = [
! \ "<<< qrstabcdefghij",
! \ " klmnopqrstabcd",
! \ " efghijklmnopqr",
\ ]
call s:compare_lines(expect, lines)

*** ../vim-9.0.0676/src/version.c 2022-10-06 16:56:40.344667631 +0100
--- src/version.c 2022-10-06 19:19:33.194772439 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 677,
/**/

--
Linux is just like a wigwam: no Windows, no Gates and an Apache inside.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages