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

patch 9.0.1626: Visual area not shown when using 'showbreak'

Problem:    Visual area not shown when using 'showbreak' and start of line is
            not visible. (Jaehwang Jung)
Solution:   Adjust "fromcol" for the space taken by 'showbreak'.
            (closes #12514)
This commit is contained in:
Bram Moolenaar
2023-06-10 19:40:30 +01:00
parent ce723f3918
commit f578ca2c8f
4 changed files with 34 additions and 1 deletions

View File

@@ -569,6 +569,11 @@ handle_showbreak_and_filler(win_T *wp, winlinevars_T *wlv)
if (wp->w_skipcol == 0 || wlv->startrow != 0 || !wp->w_p_wrap)
wlv->need_showbreak = FALSE;
wlv->vcol_sbr = wlv->vcol + MB_CHARLEN(sbr);
// Correct start of highlighted area for 'showbreak'.
if (wlv->fromcol >= wlv->vcol && wlv->fromcol < wlv->vcol_sbr)
wlv->fromcol = wlv->vcol_sbr;
// Correct end of highlighted area for 'showbreak',
// required when 'linebreak' is also set.
if (wlv->tocol == wlv->vcol)
@@ -829,7 +834,7 @@ wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
if (wp->w_p_nu && wp->w_p_rnu)
// Do not overwrite the line number, change "123 text" to
// "123>>>xt".
// "123<<<xt".
while (skip < wp->w_width && VIM_ISDIGIT(ScreenLines[off]))
{
++off;