To: vim_dev@googlegroups.com Subject: Patch 9.0.1373 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1373 Problem: Wrong text displayed when using both 'linebreak' and 'list'. Solution: Only set "c_extra" to NUL when "p_extra" is not empty. (Hirohito Higashi, closes #12065) Files: src/drawline.c, src/testdir/test_listlbr.vim *** ../vim-9.0.1372/src/drawline.c 2023-02-19 14:34:14.373629815 +0000 --- src/drawline.c 2023-03-02 18:44:13.477387656 +0000 *************** *** 3095,3101 **** ? wp->w_lcs_chars.tab3 : wp->w_lcs_chars.tab1; #ifdef FEAT_LINEBREAK ! if (wp->w_p_lbr && wlv.p_extra != NULL) wlv.c_extra = NUL; // using p_extra from above else #endif --- 3095,3102 ---- ? wp->w_lcs_chars.tab3 : wp->w_lcs_chars.tab1; #ifdef FEAT_LINEBREAK ! if (wp->w_p_lbr && wlv.p_extra != NULL ! && *wlv.p_extra != NUL) wlv.c_extra = NUL; // using p_extra from above else #endif *** ../vim-9.0.1372/src/testdir/test_listlbr.vim 2022-10-09 11:44:22.953119184 +0100 --- src/testdir/test_listlbr.vim 2023-03-02 18:48:35.805507176 +0000 *************** *** 73,78 **** --- 73,102 ---- call s:close_windows() endfunc + func Test_linebreak_with_list_and_number() + call s:test_windows('setl list listchars+=tab:>-') + call setline(1, ["abcdefg\thijklmnopqrstu", "v"]) + let lines = s:screen_lines([1, 4], winwidth(0)) + let expect_nonumber = [ + \ "abcdefg>------------", + \ "hijklmnopqrstu$ ", + \ "v$ ", + \ "~ ", + \ ] + call s:compare_lines(expect_nonumber, lines) + + setl number + let lines = s:screen_lines([1, 4], winwidth(0)) + let expect_number = [ + \ " 1 abcdefg>--------", + \ " hijklmnopqrstu$ ", + \ " 2 v$ ", + \ "~ ", + \ ] + call s:compare_lines(expect_number, lines) + call s:close_windows() + endfunc + func Test_should_break() call s:test_windows('setl sbr=+ nolist') call setline(1, "1\t" . repeat('a', winwidth(0)-2)) *** ../vim-9.0.1372/src/version.c 2023-03-02 18:36:30.272804170 +0000 --- src/version.c 2023-03-02 18:46:20.165433897 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1373, /**/ -- msdn.microsoft.com: ERROR_SUCCESS 0 (0x0) The operation completed successfully. I have always suspected that for Microsoft success is an error. /// Bram Moolenaar -- Bram@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 ///