MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / goto_line_centered

Method goto_line_centered

editor/gui/code_editor.cpp:1398–1407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396}
1397
1398void CodeTextEditor::goto_line_centered(int p_line, int p_column) {
1399 text_editor->remove_secondary_carets();
1400 text_editor->deselect();
1401 text_editor->unfold_line(CLAMP(p_line, 0, text_editor->get_line_count() - 1));
1402 text_editor->set_caret_line(p_line, false);
1403 text_editor->set_caret_column(p_column, false);
1404 text_editor->set_code_hint("");
1405 text_editor->cancel_code_completion();
1406 callable_mp((TextEdit *)text_editor, &TextEdit::center_viewport_to_caret).call_deferred(0);
1407}
1408
1409void CodeTextEditor::set_executing_line(int p_line) {
1410 text_editor->set_line_as_executing(p_line, true);

Callers 1

_goto_lineMethod · 0.45

Calls 10

CLAMPFunction · 0.85
unfold_lineMethod · 0.80
set_caret_lineMethod · 0.80
set_code_hintMethod · 0.80
deselectMethod · 0.45
get_line_countMethod · 0.45
set_caret_columnMethod · 0.45
call_deferredMethod · 0.45

Tested by

no test coverage detected