summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 16:34:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 16:34:56 +0800
commit09cd9882be4b66f270c74516759844683832b1d4 (patch)
treef9849bbe96a28dead6fcf9a869de7e43236a268e /script
parentdf4fb9b5157cbf11f3fc5f6041afef657f0acfba (diff)
downloadlua-language-server-09cd9882be4b66f270c74516759844683832b1d4.zip
typo
Diffstat (limited to 'script')
-rw-r--r--script/proto/diagnostic.lua2
-rw-r--r--script/utility.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/proto/diagnostic.lua b/script/proto/diagnostic.lua
index 25f187db..43043b94 100644
--- a/script/proto/diagnostic.lua
+++ b/script/proto/diagnostic.lua
@@ -224,7 +224,7 @@ end
---@param name string
---@return string[]
-m.getGroups = util.catchReturn(function (name)
+m.getGroups = util.cacheReturn(function (name)
local groups = {}
for groupName, nameMap in pairs(m.diagnosticGroups) do
if nameMap[name] then
diff --git a/script/utility.lua b/script/utility.lua
index a72714f1..034f19d5 100644
--- a/script/utility.lua
+++ b/script/utility.lua
@@ -835,7 +835,7 @@ m.MODE_KV = { __mode = 'kv' }
---@generic T: fun(param: any):any
---@param func T
---@return T
-function m.catchReturn(func)
+function m.cacheReturn(func)
local cache = {}
return function (param)
if cache[param] == nil then