summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-14 18:49:26 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-14 18:49:26 +0200
commitf0c24f31458e72203ca8c75d85e7fdcd1aba9673 (patch)
treef672fb6d84aaa8d86f85ff7ab45264c41f1e16b7 /core/string
parent5c56206e6c84e56d9ad229493c751690742e9d44 (diff)
parent0e8cb304a506ee3549ea8f3b7103b35a890b1ca1 (diff)
downloadredot-engine-f0c24f31458e72203ca8c75d85e7fdcd1aba9673.tar.gz
Merge pull request #79017 from bruvzg/esc_fix
[Terminal Output] Reset text properties after `print_rich`.
Diffstat (limited to 'core/string')
-rw-r--r--core/string/print_string.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/string/print_string.cpp b/core/string/print_string.cpp
index 7b90710308..dcdde3c175 100644
--- a/core/string/print_string.cpp
+++ b/core/string/print_string.cpp
@@ -164,6 +164,8 @@ void __print_line_rich(String p_string) {
p_string_ansi = p_string_ansi.replace("[/fgcolor]", "\u001b[39;49m");
}
+ p_string_ansi += "\u001b[0m"; // Reset.
+
OS::get_singleton()->print_rich("%s\n", p_string_ansi.utf8().get_data());
_global_lock();