summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-05-25 01:48:14 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-05-25 01:48:14 +0800
commitdfab76e01eb592b0cd2625d71a1ef7a859a2aee1 (patch)
treeb9e362076fd32aa7249eec8dcbd88cd89fbc5213 /script/core
parentf94bfa5aa70d959b170df1c932dd96e36e8d35a5 (diff)
downloadlua-language-server-dfab76e01eb592b0cd2625d71a1ef7a859a2aee1.zip
fix #1144
Diffstat (limited to 'script/core')
-rw-r--r--script/core/folding.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/folding.lua b/script/core/folding.lua
index 6154ba72..0034313a 100644
--- a/script/core/folding.lua
+++ b/script/core/folding.lua
@@ -66,7 +66,8 @@ local care = {
['repeat'] = function (source, text, results)
local start = source.start
local finish = source.keyword[#source.keyword]
- if text:sub(finish - #'until' + 1, finish) ~= 'until' then
+ -- must end with 'until'
+ if #source.keyword ~= 4 then
return
end
local folding = {