summaryrefslogtreecommitdiff
path: root/script/proto
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-23 19:28:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-23 19:28:34 +0800
commit5e6897bc1a25b936724af6eeb5fc463a8d395d1e (patch)
treec1c12d3b81087d201dfc2ffb8b3535ff73ba6965 /script/proto
parent127f0c549bb46d218e4b81db6c4ffd40394927ae (diff)
downloadlua-language-server-5e6897bc1a25b936724af6eeb5fc463a8d395d1e.zip
fix
Diffstat (limited to 'script/proto')
-rw-r--r--script/proto/converter.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/proto/converter.lua b/script/proto/converter.lua
index 9ff7e4dd..53b65b12 100644
--- a/script/proto/converter.lua
+++ b/script/proto/converter.lua
@@ -35,7 +35,7 @@ function m.unpackPosition(uri, position)
local text = files.getText(uri)
if text then
local lineOffset = state.lines[row]
- col = utf8.offset(text, col + 1, lineOffset) - 1
+ col = utf8.offset(text, col + 1, lineOffset) - lineOffset
end
end
local pos = guide.positionOf(row, col)