| 251 | } |
| 252 | |
| 253 | void TextEditor::apply_code() { |
| 254 | Ref<TextFile> text_file = edited_res; |
| 255 | if (text_file.is_valid()) { |
| 256 | text_file->set_text(code_editor->get_text_editor()->get_text()); |
| 257 | } |
| 258 | |
| 259 | Ref<JSON> json_file = edited_res; |
| 260 | if (json_file.is_valid()) { |
| 261 | json_file->parse(code_editor->get_text_editor()->get_text(), true); |
| 262 | } |
| 263 | code_editor->get_text_editor()->get_syntax_highlighter()->update_cache(); |
| 264 | } |
| 265 | |
| 266 | bool TextEditor::is_unsaved() { |
| 267 | const bool unsaved = |
no test coverage detected