mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
vim-patch:9.0.2189: Wrong display with 'briopt=sbr' and 'nobreakindent' (#26785)
Problem: Wrong display when 'breakindentopt' contains "sbr" and
'showbreak' and 'nobreakindent' are set.
Solution: Always reset wlv->need_showbreak regardless of the values of
'breakindent' and 'showbreak', as they aren't checked when
setting wlv->need_showbreak (zeertzjq)
closes: vim/vim#13785
7e4f62a257
This commit is contained in:
parent
31d7007bf7
commit
aecbc3f832
@ -716,10 +716,10 @@ static void handle_breakindent(win_T *wp, winlinevars_T *wlv)
|
||||
if (wlv->tocol == vcol_before) {
|
||||
wlv->tocol = wlv->vcol;
|
||||
}
|
||||
}
|
||||
|
||||
if (wp->w_skipcol > 0 && wlv->startrow == 0 && wp->w_p_wrap && wp->w_briopt_sbr) {
|
||||
wlv->need_showbreak = false;
|
||||
}
|
||||
if (wp->w_skipcol > 0 && wlv->startrow == 0 && wp->w_p_wrap && wp->w_briopt_sbr) {
|
||||
wlv->need_showbreak = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -739,9 +739,6 @@ static void handle_showbreak_and_filler(win_T *wp, winlinevars_T *wlv)
|
||||
char *const sbr = get_showbreak_value(wp);
|
||||
if (*sbr != NUL && wlv->need_showbreak) {
|
||||
// Draw 'showbreak' at the start of each broken line.
|
||||
if (wp->w_skipcol == 0 || wlv->startrow != 0 || !wp->w_p_wrap) {
|
||||
wlv->need_showbreak = false;
|
||||
}
|
||||
// Combine 'showbreak' with 'cursorline', prioritizing 'showbreak'.
|
||||
int attr = hl_combine_attr(wlv->cul_attr, win_hl_attr(wp, HLF_AT));
|
||||
colnr_T vcol_before = wlv->vcol;
|
||||
@ -759,6 +756,10 @@ static void handle_showbreak_and_filler(win_T *wp, winlinevars_T *wlv)
|
||||
wlv->tocol = wlv->vcol;
|
||||
}
|
||||
}
|
||||
|
||||
if (wp->w_skipcol == 0 || wlv->startrow > 0 || !wp->w_p_wrap || !wp->w_briopt_sbr) {
|
||||
wlv->need_showbreak = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void apply_cursorline_highlight(win_T *wp, winlinevars_T *wlv)
|
||||
|
Loading…
Reference in New Issue
Block a user