diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-18 19:07:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-18 19:07:56 +0800 |
commit | 260c24942a93888c337f0122fad09e909f7ae384 (patch) | |
tree | 07316ba5b730764a31a101326e580084b31b962d /script/core | |
parent | 2580893630af08fd38810a74a4f02013367ae17f (diff) | |
download | lua-language-server-260c24942a93888c337f0122fad09e909f7ae384.zip |
fix
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/jump-source.lua | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/script/core/jump-source.lua b/script/core/jump-source.lua index 6fb8414f..5ce5e048 100644 --- a/script/core/jump-source.lua +++ b/script/core/jump-source.lua @@ -30,10 +30,12 @@ return function (results) local doc = result.target.parent.source if doc then local uri = parseUri(doc) - result.uri = uri - result.target.uri = uri - result.target.start = guide.positionOf(doc.line - 1, doc.char) - result.target.finish = guide.positionOf(doc.line - 1, doc.char) + result.uri = uri + result.target = { + uri = uri, + start = guide.positionOf(doc.line - 1, doc.char), + finish = guide.positionOf(doc.line - 1, doc.char), + } end else local target = result.target @@ -46,10 +48,12 @@ return function (results) if doc.type == 'doc.source' and doc.bindSource == target then local uri = parseUri(doc) - result.uri = uri - result.target.uri = uri - result.target.start = guide.positionOf(doc.line - 1, doc.char) - result.target.finish = guide.positionOf(doc.line - 1, doc.char) + result.uri = uri + result.target = { + uri = uri, + start = guide.positionOf(doc.line - 1, doc.char), + finish = guide.positionOf(doc.line - 1, doc.char), + } end end end |