? wp->w_lcs_chars.tab3
: wp->w_lcs_chars.tab1;
#ifdef FEAT_LINEBREAK
- if (wp->w_p_lbr && wlv.p_extra != NULL)
+ if (wp->w_p_lbr && wlv.p_extra != NULL
+ && *wlv.p_extra != NUL)
wlv.c_extra = NUL; // using p_extra from above
else
#endif
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))