| 1497 | } |
| 1498 | |
| 1499 | Variant CodeTextEditor::get_navigation_state() { |
| 1500 | Dictionary state; |
| 1501 | |
| 1502 | state["scroll_position"] = text_editor->get_v_scroll(); |
| 1503 | state["h_scroll_position"] = text_editor->get_h_scroll(); |
| 1504 | state["column"] = text_editor->get_caret_column(); |
| 1505 | state["row"] = text_editor->get_caret_line(); |
| 1506 | |
| 1507 | state["selection"] = get_text_editor()->has_selection(); |
| 1508 | if (get_text_editor()->has_selection()) { |
| 1509 | state["selection_from_line"] = text_editor->get_selection_from_line(); |
| 1510 | state["selection_from_column"] = text_editor->get_selection_from_column(); |
| 1511 | state["selection_to_line"] = text_editor->get_selection_to_line(); |
| 1512 | state["selection_to_column"] = text_editor->get_selection_to_column(); |
| 1513 | } |
| 1514 | |
| 1515 | return state; |
| 1516 | } |
| 1517 | |
| 1518 | void CodeTextEditor::set_error(const String &p_error) { |
| 1519 | error->set_text(p_error); |
no test coverage detected