summaryrefslogtreecommitdiffstats
path: root/src/drawline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-06-10 19:40:30 +0100
committerBram Moolenaar <Bram@vim.org>2023-06-10 19:40:30 +0100
commitf578ca2c8f36b61ac3301fe8b59a8473c964cdc2 (patch)
tree1b2828f46909ddbb9d09b522019d406ebc1462ca /src/drawline.c
parentce723f391844695a07d9af02ef60330afd3e158c (diff)
patch 9.0.1626: Visual area not shown when using 'showbreak'v9.0.1626
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)
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 848b3ae892..0638c56822 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -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;