To: vim_dev@googlegroups.com Subject: Patch 9.0.0677 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 = [ ! \ "<<