summaryrefslogtreecommitdiff
path: root/script/core/find-source.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-20 17:43:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-20 17:43:58 +0800
commitf7399c6206378b76c87a7386707cf8e24d5a98ac (patch)
treeb193931413091f363bee9d35a506c8dc4b359dc8 /script/core/find-source.lua
parentea94ae75080956dd49608d2a870f45f4c6ff82d8 (diff)
downloadlua-language-server-f7399c6206378b76c87a7386707cf8e24d5a98ac.zip
`cast-field-type`
Diffstat (limited to 'script/core/find-source.lua')
-rw-r--r--script/core/find-source.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/find-source.lua b/script/core/find-source.lua
index 26a411e5..99013b31 100644
--- a/script/core/find-source.lua
+++ b/script/core/find-source.lua
@@ -21,7 +21,7 @@ return function (ast, position, accept)
end
end
local start, finish = guide.getStartFinish(source)
- if finish - start < len and accept[source.type] then
+ if finish - start <= len and accept[source.type] then
result = source
len = finish - start
end