aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/screen.c2
-rw-r--r--src/nvim/testdir/test_breakindent.vim10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 8f8bfee60c..a165ce2586 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2994,7 +2994,7 @@ win_line (
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) {
+ if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_p_brisbr) {
need_showbreak = false;
}
// Correct end of highlighted area for 'breakindent',
diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim
index 6d88f1dc5a..5675bf74dd 100644
--- a/src/nvim/testdir/test_breakindent.vim
+++ b/src/nvim/testdir/test_breakindent.vim
@@ -361,5 +361,15 @@ func Test_breakindent19_sbr_nextpage()
\ "> 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