fix(column): apply custom highlight to last 'statuscolumn' segment (#32182)

This commit is contained in:
luukvbaal
2025-01-24 00:42:24 +01:00
committed by GitHub
parent 2cd72258f6
commit 8bc28978b6
2 changed files with 10 additions and 2 deletions

View File

@@ -654,8 +654,8 @@ static void draw_statuscol(win_T *wp, winlinevars_T *wlv, linenr_T lnum, int vir
p = sp->start;
}
size_t translen = transstr_buf(p, buf + len - p, transbuf, MAXPATHL, true);
draw_col_buf(wp, wlv, transbuf, translen, num_attr, fold_vcol, false);
draw_col_fill(wlv, schar_from_ascii(' '), stcp->width - width, num_attr);
draw_col_buf(wp, wlv, transbuf, translen, cur_attr, fold_vcol, false);
draw_col_fill(wlv, schar_from_ascii(' '), stcp->width - width, cur_attr);
}
static void handle_breakindent(win_T *wp, winlinevars_T *wlv)

View File

@@ -227,6 +227,14 @@ describe('statuscolumn', function()
{1: }{8:8│}aaaaa |
|
]])
-- Last segment and fillchar are highlighted properly
command("set stc=%#Error#%{v:relnum?'Foo':'FooBar'}")
screen:expect([[
{9:Foo }aaaaa |*4
{9:FooBar}^aaaaa |
{9:Foo }aaaaa |*8
|
]])
end)
it('works with wrapped lines, signs and folds', function()