From 91d2e95542ee6a908b0adf46d420c1696ae31a9d Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 12 Oct 2019 17:13:14 -0400 Subject: lexlua: Prevent double-counting of fold points on a single line. If a fold word appears more than once on a line, ensure that each occurrence satisfies the fold point criteria, rather than just one of them. --- lexlua/lexer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lexlua/lexer.lua') diff --git a/lexlua/lexer.lua b/lexlua/lexer.lua index 724240a04..27265e010 100644 --- a/lexlua/lexer.lua +++ b/lexlua/lexer.lua @@ -1342,7 +1342,7 @@ function M.fold(lexer, text, start_pos, start_line, start_level) end end end - s = line:find(symbol, s + 1, true) + s, e = line:find(symbol, s + 1, true) end end folds[line_num] = prev_level -- cgit v1.2.3