diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-27 19:08:53 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-12-27 19:08:53 +0100 |
commit | 23627722d36b49e38ba6f8dc6bb3ebe19c98a83b (patch) | |
tree | e4c8e30c76559504779d2c5b130c8981bb42cc74 /src/drawline.c | |
parent | 92feeaffc291d3247fd7c591c5ee4ec1b6c957ec (diff) |
patch 9.0.2187: Visual not drawn with 'breakindent' when line doesn't fitv9.0.2187
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>
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drawline.c b/src/drawline.c index 9f385f033a..08b6f45c44 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -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) |