diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-29 01:51:08 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-12 17:39:06 +0200 |
commit | df02f9cc37be38b8189991f9e76bfcafa6e271c6 (patch) | |
tree | cef89aed59061f8f24eeb379364cc85a38882533 /src/nvim/screen.c | |
parent | f2fd5afb48786c4272105b0adda6977ee1fd6f2e (diff) | |
download | rneovim-df02f9cc37be38b8189991f9e76bfcafa6e271c6.tar.gz rneovim-df02f9cc37be38b8189991f9e76bfcafa6e271c6.tar.bz2 rneovim-df02f9cc37be38b8189991f9e76bfcafa6e271c6.zip |
vim-patch:8.0.0090 fix breakindent bug
(original Vim commit-message is bogus)
https://github.com/vim/vim/commit/6c896867c4f5d759616028ef7cbfce2a9ed32600
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index cd4f4de40f..e3a2c1ffec 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2195,7 +2195,7 @@ win_line ( int change_start = MAXCOL; /* first col of changed area */ int change_end = -1; /* last col of changed area */ colnr_T trailcol = MAXCOL; /* start of trailing spaces */ - int need_showbreak = FALSE; + int need_showbreak = false; // overlong line, skip first x chars int line_attr = 0; /* attribute for the whole line */ matchitem_T *cur; /* points to the match list */ match_T *shl; /* points to search_hl or a match */ @@ -2805,8 +2805,10 @@ win_line ( // draw 'breakindent': indent wrapped text accodringly if (draw_state == WL_BRI - 1 && n_extra == 0) { draw_state = WL_BRI; - if (wp->w_p_bri && row != startrow && filler_lines == 0) { - char_attr = wp->w_hl_attr_normal; // was: hl_attr(HLF_AT); + // if need_showbreak is set, breakindent also applies + if (wp->w_p_bri && (row != startrow || need_showbreak) + && filler_lines == 0) { + char_attr = wp->w_hl_attr_normal; if (diff_hlf != (hlf_T)0) { char_attr = win_hl_attr(wp, diff_hlf); |