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>
diff --git a/src/drawline.c b/src/drawline.c
index 9f385f0..08b6f45 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -527,6 +527,12 @@
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)