瀏覽代碼

Merge pull request #79017 from bruvzg/esc_fix

[Terminal Output] Reset text properties after `print_rich`.
Yuri Sizov 2 年之前
父節點
當前提交
f0c24f3145
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core/string/print_string.cpp

+ 2 - 0
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();