diff options
| author | Jonathan Poelen <[email protected]> | 2020-11-14 01:59:15 +0100 |
|---|---|---|
| committer | Jonathan Poelen <[email protected]> | 2020-11-14 02:11:27 +0100 |
| commit | 0f1ab80c1f613c768c70cbb782db0962a8153765 (patch) | |
| tree | ccd82afaf653a85fbf55f5e3aee159577aa856a7 | |
| parent | 312521468d7fb068d7527a2efb33335073bfea0b (diff) | |
fix default value of choice options displayed in the graphical menu
| -rw-r--r-- | xmake/core/ui/mconfdialog.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/core/ui/mconfdialog.lua b/xmake/core/ui/mconfdialog.lua index e52f87e46..d430e4a18 100644 --- a/xmake/core/ui/mconfdialog.lua +++ b/xmake/core/ui/mconfdialog.lua @@ -252,14 +252,16 @@ function mconfdialog:show_help() if config.kind then text = text .. "\ntype: " .. config.kind end - if config.default then - text = text .. "\ndefault: " .. tostring(config.default) - end if config.kind == "choice" then + if config.default and config.values[config.default] then + text = text .. "\ndefault: " .. config.values[config.default] + end text = text .. "\nvalues: " for _, value in ipairs(config.values) do text = text .. "\n - " .. value end + elseif config.default then + text = text .. "\ndefault: " .. tostring(config.default) end if config.path then text = text .. "\npath: " .. config.path |
