summaryrefslogtreecommitdiff
path: root/server-beta/src/proto/provider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/proto/provider.lua')
-rw-r--r--server-beta/src/proto/provider.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/server-beta/src/proto/provider.lua b/server-beta/src/proto/provider.lua
index 1799a284..9f3b5697 100644
--- a/server-beta/src/proto/provider.lua
+++ b/server-beta/src/proto/provider.lua
@@ -163,10 +163,11 @@ proto.on('textDocument/definition', function (params)
for i, info in ipairs(result) do
local targetUri = info.uri
local targetLines = files.getLines(targetUri)
+ local targetText = files.getText(targetUri)
response[i] = interface.locationLink(targetUri
- , interface.range(targetLines, text, info.target.start - 1, info.target.finish)
- , interface.range(targetLines, text, info.target.start - 1, info.target.finish)
- , interface.range(lines , text, info.source.start - 1, info.source.finish)
+ , interface.range(targetLines, targetText, info.target.start - 1, info.target.finish)
+ , interface.range(targetLines, targetText, info.target.start - 1, info.target.finish)
+ , interface.range(lines, text, info.source.start - 1, info.source.finish)
)
end
return response