From 260c24942a93888c337f0122fad09e909f7ae384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 18 Jul 2022 19:07:56 +0800 Subject: fix --- script/core/jump-source.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'script/core') 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 -- cgit v1.2.3