diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-04 16:31:51 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-04 16:31:51 +0800 |
commit | eb1fffc9ddfaa804973b1e05c7001d84194ce5a6 (patch) | |
tree | 42400b6fb8a9b32acc34deeab31173ebd9491c87 /server-beta/src/proto | |
parent | 318f70aeb98b0a1cca0d69b440e08b15c1aca2c4 (diff) | |
download | lua-language-server-eb1fffc9ddfaa804973b1e05c7001d84194ce5a6.zip |
修正一些bug
Diffstat (limited to 'server-beta/src/proto')
-rw-r--r-- | server-beta/src/proto/provider.lua | 7 |
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 |