diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-23 19:59:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-23 19:59:22 +0100 |
commit | dfede9a70b3136988a8f262742101ad5cb98f46d (patch) | |
tree | 7274266f12167dfe2ff671b2faa4be166abccda3 /src/drawline.c | |
parent | 2c02d3843a103826a3eb44357eaab09b7deb256b (diff) |
patch 8.2.0146: wrong indent when 'showbreak' and 'breakindent' are setv8.2.0146
Problem: Wrong indent when 'showbreak' and 'breakindent' are set and
'briopt' includes "sbr".
Solution: Reset "need_showbreak" where needed. (Ken Takata, closes #5523)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c index 3e8b8b9500..4723915830 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -1176,6 +1176,8 @@ 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) + need_showbreak = FALSE; // Correct end of highlighted area for 'breakindent', // required when 'linebreak' is also set. if (tocol == vcol) @@ -1222,7 +1224,8 @@ win_line( c_extra = NUL; c_final = NUL; n_extra = (int)STRLEN(sbr); - need_showbreak = FALSE; + if (wp->w_skipcol == 0 || !wp->w_p_wrap) + need_showbreak = FALSE; vcol_sbr = vcol + MB_CHARLEN(sbr); // Correct end of highlighted area for 'showbreak', // required when 'linebreak' is also set. |