summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-01-08 23:26:48 +0800
committerruki <[email protected]>2019-01-08 14:40:53 +0800
commit6d2449f9d3c5aa774de7cec9da4953ea9fefb27a (patch)
tree449cd556b4321917b9789669405adbd5fb81242d
parentb89133030bf65a5af1e33b0923a7b0df3edec76f (diff)
fix show theme bug
-rw-r--r--xmake/core/base/colors.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua
index 589288f16..4beddd073 100644
--- a/xmake/core/base/colors.lua
+++ b/xmake/core/base/colors.lua
@@ -341,11 +341,11 @@ function colors.translate(str)
else
table.insert(blocks, block)
end
- elseif block:startswith("color.") then
- local default_colors = {["bright color.error"] = {"bright", "red"}, ["bright color.warning"] = {"bright", "yellow"}}
- local theme_block = default_colors[block]
+ elseif block:startswith("color.") or block:startswith("text.") then
+ local default_theme = {["color.error"] = "red", ["color.warning"] = "yellow", ["text.error"] = "error", ["text.warning"] = "warning"}
+ local theme_block = default_theme[block]
if theme_block then
- table.join2(blocks, theme_block)
+ table.insert(blocks, theme_block)
else
table.insert(blocks, block)
end