summaryrefslogtreecommitdiff
path: root/script/proto/converter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/proto/converter.lua')
-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)