summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-22 20:29:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-22 20:29:22 +0800
commit22cfc98fa8684002e6ab8a8279e898862ba0f494 (patch)
tree19d5ab0c9948d0e0ebacee72cd4689aad4b8cee6 /script
parent928b40c6f186c4692212ff1f9751da4755aa6841 (diff)
downloadlua-language-server-22cfc98fa8684002e6ab8a8279e898862ba0f494.zip
fix
Diffstat (limited to 'script')
-rw-r--r--script/core/completion.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index f7464064..4f666847 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -70,7 +70,7 @@ local function findNearestTableField(state, position)
local uri = state.uri
local text = files.getText(uri)
local offset = guide.positionToOffset(state, position)
- local soffset = lookBackward.findAnyOffset(text, offset - 1)
+ local soffset = lookBackward.findAnyOffset(text, offset)
if not soffset then
return nil
end