To: vim_dev@googlegroups.com Subject: Patch 8.2.0308 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0308 Problem: 'showbreak' does not work for a very long line. (John Little) Solution: Check whether 'briopt' contains "sbr". (Ken Takata, closes #5523, closes #5684) Files: src/drawline.c, src/testdir/test_breakindent.vim *** ../vim-8.2.0307/src/drawline.c 2020-02-01 21:57:00.848520936 +0100 --- src/drawline.c 2020-02-23 15:12:50.180879813 +0100 *************** *** 1176,1182 **** c_final = NUL; n_extra = get_breakindent_win(wp, ml_get_buf(wp->w_buffer, lnum, FALSE)); ! if (wp->w_skipcol > 0 && wp->w_p_wrap) need_showbreak = FALSE; // Correct end of highlighted area for 'breakindent', // required when 'linebreak' is also set. --- 1176,1182 ---- c_final = NUL; n_extra = get_breakindent_win(wp, ml_get_buf(wp->w_buffer, lnum, FALSE)); ! if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_p_brisbr) need_showbreak = FALSE; // Correct end of highlighted area for 'breakindent', // required when 'linebreak' is also set. *** ../vim-8.2.0307/src/testdir/test_breakindent.vim 2020-01-26 21:59:25.632718110 +0100 --- src/testdir/test_breakindent.vim 2020-02-23 15:12:50.180879813 +0100 *************** *** 682,686 **** --- 682,696 ---- \ "> aaaaaaaaaaaaaaaaaa", \ ] call s:compare_lines(expect, lines) + + setl breakindent briopt=min:18 sbr=> + norm! 5gj + let lines = s:screen_lines(1, 20) + let expect = [ + \ ">aaaaaaaaaaaaaaaaaaa", + \ ">aaaaaaaaaaaaaaaaaaa", + \ ">aaaaaaaaaaaaaaaaaaa", + \ ] + call s:compare_lines(expect, lines) call s:close_windows('set breakindent& briopt& sbr&') endfunc *** ../vim-8.2.0307/src/version.c 2020-02-23 15:10:13.569404928 +0100 --- src/version.c 2020-02-23 15:16:36.796117011 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 308, /**/ -- hundred-and-one symptoms of being an internet addict: 105. When someone asks you for your address, you tell them your URL. /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///