Skip to content

Commit

Permalink
fix: avoid repeat foldclose or foldopen chars when 'wrap' is set (#107
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ofseed authored and luukvbaal committed Feb 15, 2024
1 parent b9e87ca commit e9e4c30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/statuscol/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ function M.foldfunc(args)
-- For each column, add a foldopen, foldclosed, foldsep or padding char
local range = level < width and level or width
for col = 1, range do
if closed and (col == level or col == width) then
if args.virtnum ~= 0 then
string = string..args.fold.sep
elseif closed and (col == level or col == width) then
string = string..args.fold.close
elseif foldinfo.start == args.lnum and first_level + col > foldinfo.llevel then
string = string..args.fold.open
Expand Down

0 comments on commit e9e4c30

Please sign in to comment.