perf(column): only build fold/sign column when present in 'statuscolumn'

Problem:    The fold and sign column is built and stored regardless of
            whether the corresponding item is present in 'statuscolumn'.
Solution:   Since the 'statuscolumn' parses itself, we can defer
            building the columns until the corresponding item is
            actually encountered.
This commit is contained in:
Luuk van Baal
2023-01-31 00:52:34 +01:00
parent 964ae205a5
commit 08fb3b5309
6 changed files with 64 additions and 60 deletions

View File

@@ -456,7 +456,7 @@ describe('statuscolumn', function()
14 aaaaa |
|
]])
command('set stc=') -- also for the default sign column
command('set stc=') -- also for the default fold column
screen:expect_unchanged()
-- 'statuscolumn' is not too wide with custom (bogus) fold column
command([[set stc=%{foldlevel(v:lnum)>0?repeat('-',foldlevel(v:lnum)):''}%=%l\ ]])