summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/core/folding.lua3
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 8ab70303..557e9c66 100644
--- a/changelog.md
+++ b/changelog.md
@@ -10,6 +10,7 @@
* `FIX` [#1131](https://github.com/sumneko/lua-language-server/issues/1131)
* `FIX` [#1134](https://github.com/sumneko/lua-language-server/issues/1134)
* `FIX` [#1141](https://github.com/sumneko/lua-language-server/issues/1141)
+* `FIX` [#1144](https://github.com/sumneko/lua-language-server/issues/1144)
## 3.2.3
`2022-5-16`
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 = {