diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index d0364e4edd9..7ff3d3e634f 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1816,7 +1816,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref &ev) { } } } - if (!caret_clicked) { + if (caret_clicked < 0) { tx->deselect(); tx->remove_secondary_carets(); caret_clicked = 0;