Merge pull request #36030 from dreamsComeTrue/fix-replace-text-entered

Allow using Enter key for replacing text in code editors
This commit is contained in:
Rémi Verschelde 2020-02-14 07:23:49 +01:00 committed by GitHub
commit 94bf1a8a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,6 +517,11 @@ void FindReplaceBar::_replace_text_entered(const String &p_text) {
if (selection_only->is_pressed() && text_edit->is_selection_active()) {
_replace_all();
_hide_bar();
} else if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
_replace();
search_prev();
} else {
_replace();
}
}