summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-15 20:31:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-15 20:31:33 +0800
commitbfb7d2eb7b846888d34a24810eaf6943d618b233 (patch)
tree599a373bb8b41652f65aa7e7b64ec4462c6f0acb /script/parser
parent206b9ff94395708390595e73ed2b2528e7a84cad (diff)
downloadlua-language-server-bfb7d2eb7b846888d34a24810eaf6943d618b233.zip
fix completion at end of line
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/guide.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 8d681fdc..a9d832b2 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -698,7 +698,7 @@ function m.positionOf(lines, offset)
end
local lastLine = lines[#lines]
if offset > lastLine.finish then
- return #lines, offset - lastLine.start
+ return #lines, offset - lastLine.start + 1
end
local min = 1
local max = #lines