summaryrefslogtreecommitdiff
path: root/xmake/core/language/menu.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-02-01 23:15:20 +0800
committerruki <[email protected]>2018-02-01 13:32:01 +0800
commitdc29eb443366d6ff754c7f0c05e51e7d1aab3c21 (patch)
tree2d418994d0244358127a92c2dfb37c909eb4a1c0 /xmake/core/language/menu.lua
parent0ee92c0da0bfd6d9215622fedbd321aabf87f061 (diff)
improve console menu options
Diffstat (limited to 'xmake/core/language/menu.lua')
-rw-r--r--xmake/core/language/menu.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/xmake/core/language/menu.lua b/xmake/core/language/menu.lua
index 03fcb127e..89c80dc29 100644
--- a/xmake/core/language/menu.lua
+++ b/xmake/core/language/menu.lua
@@ -47,7 +47,6 @@ function menu.options(action)
-- load and merge all language options
local exist = {}
local results = {}
- local newline = false
for _, instance in pairs(languages) do
-- get menu
@@ -67,22 +66,15 @@ function menu.options(action)
if not exist[name] then
table.insert(results, option)
exist[name] = true
- newline = false
end
- elseif option.category or not newline then
+ else
table.insert(results, option)
- newline = true
end
end
end
end
end
- -- remove the last empty option
- if results[#results][2] == nil then
- table.remove(results)
- end
-
-- ok?
return results
end