diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index d8648310b65..18848163863 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1456,8 +1456,6 @@ void CodeTextEditor::set_edit_state(const Variant &p_state) { text_editor->set_line_as_bookmark(bookmarks[i], true); } } - - text_editor->grab_focus(); } void CodeTextEditor::set_error(const String &p_error) { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 4f783f4e275..f1bfd5617ce 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -696,7 +696,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { Node *tselected = tab_container->get_child(selected); - ScriptEditorBase *current = Object::cast_to(tab_container->get_child(selected)); + ScriptEditorBase *current = Object::cast_to(tselected); if (current) { Ref