0
0
mirror of https://github.com/vim/vim.git synced 2025-10-17 07:44:28 -04:00

patch 9.0.2187: Visual not drawn with 'breakindent' when line doesn't fit

Problem:  Visual selection isn't drawn with 'breakindent' when the line
          doesn't fit in the window (Jaehwang Jung)
Solution: Adjust wlv->fromcol also for 'breakindent' (zeertzjq)

closes: #13767
closes: #13768

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2023-12-27 19:08:53 +01:00
committed by Christian Brabandt
parent 92feeaffc2
commit 23627722d3
7 changed files with 55 additions and 0 deletions

View File

@@ -527,6 +527,12 @@ handle_breakindent(win_T *wp, winlinevars_T *wlv)
if (wp->w_skipcol > 0 && wlv->startrow == 0
&& wp->w_p_wrap && wp->w_briopt_sbr)
wlv->need_showbreak = FALSE;
// Correct start of highlighted area for 'breakindent',
if (wlv->fromcol >= wlv->vcol
&& wlv->fromcol < wlv->vcol + wlv->n_extra)
wlv->fromcol = wlv->vcol + wlv->n_extra;
// Correct end of highlighted area for 'breakindent',
// required when 'linebreak' is also set.
if (wlv->tocol == wlv->vcol)