# HG changeset patch # User Bram Moolenaar # Date 1665081004 -7200 # Node ID 0e58aae554869a83b7a447d1ed3068379ac284b3 # Parent fc971ca2a6b4a907f9b8c886f31b8e0a5716ba80 patch 9.0.0677: breakindent test accepts wrong result Commit: https://github.com/vim/vim/commit/06618f94f1c9ed73a84ad5d6a8e1933b0b8da846 Author: Bram Moolenaar Date: Thu Oct 6 19:21:20 2022 +0100 patch 9.0.0677: breakindent test accepts wrong result Problem: Breakindent test accepts wrong result. Solution: Fix the number column and adjust the expected text. diff --git a/src/drawline.c b/src/drawline.c --- a/src/drawline.c +++ b/src/drawline.c @@ -343,9 +343,8 @@ handle_lnum_col( 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)) + && (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,7 +362,7 @@ handle_lnum_col( #ifdef FEAT_PROP_POPUP + wlv->text_prop_above_count #endif - ) + && (wp->w_skipcol == 0 || wlv->row > wp->w_winrow)) { long num; char *fmt = "%*ld "; diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim --- a/src/testdir/test_breakindent.vim +++ b/src/testdir/test_breakindent.vim @@ -671,14 +671,14 @@ endfunc 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)) + call setline(1, repeat('abcdefghijklmnopqrst', 10)) norm! 1gg redraw! let lines = s:screen_lines(1, 20) let expect = [ - \ " 1 aaaaaaaaaaaaaaaa", - \ " aaaaaaaaaaaaaaaa", - \ " aaaaaaaaaaaaaaaa", + \ " 1 abcdefghijklmnop", + \ " qrstabcdefghijkl", + \ " mnopqrstabcdefgh", \ ] call s:compare_lines(expect, lines) " Scroll down one screen line @@ -686,11 +686,10 @@ func Test_breakindent20_cpo_n_nextpage() norm! 5gj redraw! let lines = s:screen_lines(1, 20) - " FIXME: this is not the right result let expect = [ - \ "<<