diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/core/implementation.lua | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 8f19fd0a..087fbf85 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 3.8.4 +* `NEW` goto implementation + ## 3.8.3 `2024-4-23` * `FIX` server may crash when the workspace is using a non-English path. diff --git a/script/core/implementation.lua b/script/core/implementation.lua index da4d4c8b..e48e2f73 100644 --- a/script/core/implementation.lua +++ b/script/core/implementation.lua @@ -78,6 +78,7 @@ local function convertIndex(source) return source end +---@async return function (uri, offset) local ast = files.getState(uri) if not ast then @@ -91,9 +92,12 @@ return function (uri, offset) local results = {} - local defs = vm.getDefs(source) + local defs = vm.getRefs(source) for _, src in ipairs(defs) do + if not guide.isAssign(src) then + goto CONTINUE + end if src.type == 'global' then goto CONTINUE end |