aboutsummaryrefslogtreecommitdiff
path: root/builtin/common
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/common')
-rw-r--r--builtin/common/misc_helpers.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua
index a1417dbd4..2318cea12 100644
--- a/builtin/common/misc_helpers.lua
+++ b/builtin/common/misc_helpers.lua
@@ -667,7 +667,14 @@ else
end
function core.colorize(color, message)
- return core.get_color_escape_sequence(color) .. message .. core.get_color_escape_sequence("#ffffff")
+ local lines = message:split("\n", true)
+ local color_code = core.get_color_escape_sequence(color)
+
+ for i, line in ipairs(lines) do
+ lines[i] = colour_code .. line
+ end
+
+ return table.concat(lines, "\n") .. core.get_color_escape_sequence("#ffffff")
end
end