CodeEditor: Make possible to select and copy error text

This commit is contained in:
Danil Alexeev 2025-05-07 00:16:03 +03:00 committed by Rémi Verschelde
parent 03bd8ba9c2
commit db9b8ff003
No known key found for this signature in database
GPG key ID: C3336907360768E1
7 changed files with 150 additions and 81 deletions

View file

@ -200,7 +200,7 @@ void TextEditor::_validate_script() {
code_editor->set_error("");
if (json_file->parse(te->get_text(), true) != OK) {
code_editor->set_error(json_file->get_error_message());
code_editor->set_error(json_file->get_error_message().replace("[", "[lb]"));
code_editor->set_error_pos(json_file->get_error_line(), 0);
te->set_line_background_color(code_editor->get_error_pos().x, EDITOR_GET("text_editor/theme/highlighting/mark_color"));
}