diff options
| author | gly <[email protected]> | 2022-12-27 16:34:46 +0100 |
|---|---|---|
| committer | gly <[email protected]> | 2022-12-27 16:34:46 +0100 |
| commit | 5e302c4e92e60a7af8b5d3b2b21b2eb40a84d388 (patch) | |
| tree | 839956c4dc4d5a7b9d9acc19abf797e145500abb /xmake/modules/private/utils/completer.lua | |
| parent | d3ce4342357c60cbd9aea933a8289708254e8ce8 (diff) | |
correct completer when there's no values option
Diffstat (limited to 'xmake/modules/private/utils/completer.lua')
| -rw-r--r-- | xmake/modules/private/utils/completer.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/completer.lua b/xmake/modules/private/utils/completer.lua index 7688afc4e..e4427bc87 100644 --- a/xmake/modules/private/utils/completer.lua +++ b/xmake/modules/private/utils/completer.lua @@ -229,7 +229,9 @@ function completer:_complete_option_v(options, current, completing) end -- get completion candidates from values option local function _values_into_candidates(values) - if type(values) == "function" then + if values == nil then + return {} + elseif type(values) == "function" then -- no need to filter result of values() as we consider values() already filter candidates return _transform_values(values(completing, current)) else |
