Skip to content

Commit

Permalink
Fixed legacy support for lexer.fold_consecutive_lines().
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitalquark committed Aug 5, 2023
1 parent 0c8d4ad commit 9569188
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lexers/lexer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ end
-- @usage lex:add_fold_point(lexer.KEYWORD, 'if', 'end')
-- @usage lex:add_fold_point('custom', function(text, pos, line, s, symbol) ... end)
function M.add_fold_point(lexer, tag_name, start_symbol, end_symbol)
if not start_symbol and not end_symbol then return end -- from legacy fold_consecutive_lines()
if not lexer._fold_points then lexer._fold_points = {_symbols = {}} end
local symbols = lexer._fold_points._symbols
if not lexer._fold_points[tag_name] then lexer._fold_points[tag_name] = {} end
Expand Down

0 comments on commit 9569188

Please sign in to comment.