summaryrefslogtreecommitdiff
path: root/script/core/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-03 11:24:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-03 11:24:19 +0800
commitf1ced65b41bd764c9656a9523ddfd3d43aa2cfb1 (patch)
tree75d03477d30b4c6f9f0376aaa3ce265ec3a4a96e /script/core/completion.lua
parentaddc4a466252547b163ab37efd1344bfe0b48b9c (diff)
downloadlua-language-server-f1ced65b41bd764c9656a9523ddfd3d43aa2cfb1.zip
fix #780
Diffstat (limited to 'script/core/completion.lua')
-rw-r--r--script/core/completion.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index e30c9c91..21fd69bd 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -718,7 +718,8 @@ end
local function isInString(state, position)
return guide.eachSourceContain(state.ast, position, function (source)
- if source.type == 'string' then
+ if source.type == 'string'
+ and source.start < position then
return true
end
end)