Merge pull request #62567 from voylin/Print_Rich_fix_terminal_only

Fixing print_rich() which only displays correctly in terminal - Fixes #62560
This commit is contained in:
Rémi Verschelde 2022-06-30 23:02:39 +02:00 committed by GitHub
commit 0bc500eee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -297,6 +297,14 @@ void RemoteDebugger::flush_output() {
}
strings.push_back(output_string.message);
types.push_back(MESSAGE_TYPE_ERROR);
} else if (output_string.type == MESSAGE_TYPE_LOG_RICH) {
if (!joined_log_strings.is_empty()) {
strings.push_back(String("\n").join(joined_log_strings));
types.push_back(MESSAGE_TYPE_LOG_RICH);
joined_log_strings.clear();
}
strings.push_back(output_string.message);
types.push_back(MESSAGE_TYPE_LOG_RICH);
} else {
joined_log_strings.push_back(output_string.message);
}

View File

@ -428,6 +428,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
case RemoteDebugger::MESSAGE_TYPE_LOG: {
msg_type = EditorLog::MSG_TYPE_STD;
} break;
case RemoteDebugger::MESSAGE_TYPE_LOG_RICH: {
msg_type = EditorLog::MSG_TYPE_STD_RICH;
} break;
case RemoteDebugger::MESSAGE_TYPE_ERROR: {
msg_type = EditorLog::MSG_TYPE_ERROR;
} break;