perf(statuscolumn): only fill click defs array once per redraw (#21884)

Problem:    'statuscolumn' click definitions are cleared, evaluated,
            allocated and filled each redraw for every row in a window.
            This despite the fact that we only store a single click
            definition array for the entire column as opposed to one
            for each row.
Solution:   Only fill the 'statuscolumn' click definition array once per
            window per redraw.

Resolve https://github.com/neovim/neovim/issues/21767.
This commit is contained in:
luukvbaal
2023-01-20 00:47:02 +01:00
committed by GitHub
parent 775e292290
commit 999bb983f0
3 changed files with 19 additions and 9 deletions

View File

@@ -61,7 +61,7 @@ describe('statuscolumn', function()
]])
end)
it("works with 'statuscolumn'", function()
it("works with 'number' and 'relativenumber'", function()
command([[set stc=%{&nu?v:lnum:''}%=%{&rnu?'\ '.v:relnum:''}│]])
screen:expect([[
4 │aaaaa |