summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/implementation.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/method/textDocument/implementation.lua')
-rw-r--r--server/src/method/textDocument/implementation.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/method/textDocument/implementation.lua b/server/src/method/textDocument/implementation.lua
index aef9f1a0..07d48870 100644
--- a/server/src/method/textDocument/implementation.lua
+++ b/server/src/method/textDocument/implementation.lua
@@ -7,7 +7,7 @@ return function (lsp, params)
return {}
end
-- lua是从1开始的,因此都要+1
- local position = lines:position(params.position.line + 1, params.position.character + 1, 'utf8')
+ local position = lines:position(params.position.line + 1, params.position.character + 1)
local positions = matcher.implementation(results, position)
if not positions then
return {}
@@ -16,8 +16,8 @@ return function (lsp, params)
local locations = {}
for i, position in ipairs(positions) do
local start, finish = position[1], position[2]
- local start_row, start_col = lines:rowcol(start, 'utf8')
- local finish_row, finish_col = lines:rowcol(finish, 'utf8')
+ local start_row, start_col = lines:rowcol(start)
+ local finish_row, finish_col = lines:rowcol(finish)
locations[i] = {
uri = uri,
range = {