diff options
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 4ab9a72694..4609ba1036 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1226,15 +1226,16 @@ CodeTextEditor::CodeTextEditor() { ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS); ED_SHORTCUT("script_editor/reset_zoom", TTR("Reset Zoom"), KEY_MASK_CMD | KEY_0); + text_editor = memnew(TextEdit); + add_child(text_editor); + text_editor->set_v_size_flags(SIZE_EXPAND_FILL); + + // Added second to it opens at the bottom, so it won't shift the entire text editor when opening find_replace_bar = memnew(FindReplaceBar); add_child(find_replace_bar); find_replace_bar->set_h_size_flags(SIZE_EXPAND_FILL); find_replace_bar->hide(); - text_editor = memnew(TextEdit); - add_child(text_editor); - text_editor->set_v_size_flags(SIZE_EXPAND_FILL); - find_replace_bar->set_text_edit(text_editor); text_editor->set_show_line_numbers(true); |