diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-25 01:48:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-25 01:48:14 +0800 |
commit | dfab76e01eb592b0cd2625d71a1ef7a859a2aee1 (patch) | |
tree | b9e362076fd32aa7249eec8dcbd88cd89fbc5213 /script/core | |
parent | f94bfa5aa70d959b170df1c932dd96e36e8d35a5 (diff) | |
download | lua-language-server-dfab76e01eb592b0cd2625d71a1ef7a859a2aee1.zip |
fix #1144
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/folding.lua | 3 |
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 = { |