diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-09-09 11:39:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 11:39:31 +0800 |
commit | a126e9c4850726f86d8480aacbb8ec23c1b158ef (patch) | |
tree | 4d10fc7ce75ff7ea13f46a90608574e66fed121c /script | |
parent | d1320ae5e41086fd9f569c2504a88130447444b8 (diff) | |
parent | 7784a06294c4ced20444ab258ca09833bb6b0f7e (diff) | |
download | lua-language-server-a126e9c4850726f86d8480aacbb8ec23c1b158ef.zip |
Fix correctly display enums for function overload arguments
Diffstat (limited to 'script')
-rw-r--r-- | script/core/completion/completion.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index 866d6590..43b5d5ce 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -78,7 +78,9 @@ local function findNearestSource(state, position) ---@type parser.object local source guide.eachSourceContain(state.ast, position, function (src) - source = src + if not source or source.start <= src.start then + source = src + end end) return source end |