summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-29 17:06:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-29 17:06:16 +0800
commitf4a4fc63cf14f038a07068292909432f28f0c2a7 (patch)
treedddbaf6c9bf5367202f2807a8e599f3254ceb67a /script/core
parentec613851607c1fdeb256afa195d79760bb2e66c6 (diff)
downloadlua-language-server-f4a4fc63cf14f038a07068292909432f28f0c2a7.zip
fix
Diffstat (limited to 'script/core')
-rw-r--r--script/core/matchkey.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/core/matchkey.lua b/script/core/matchkey.lua
index eb67dac6..3c6a54a8 100644
--- a/script/core/matchkey.lua
+++ b/script/core/matchkey.lua
@@ -12,16 +12,17 @@ local function isValidFirstChar(input, other)
if first == other:sub(1, 1):upper() then
return true
end
- local pos, char = other:find(first, 2, true)
+ local pos = other:find(first, 2, true)
if not pos and uppers[first] then
-- word after symbol?
if other:find('%A' .. first:lower(), 2) then
return true
end
end
- if not char then
+ if not pos then
return false
end
+ local char = other:sub(pos, pos)
-- symbol?
if not uppers[char] then
return true