Skip to content

Commit f491d2f

Browse files
committed
Don't try to move selection if there are no visible elements
1 parent e65a237 commit f491d2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

editor/gui/editor_quick_open_dialog.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ void QuickOpenResultContainer::handle_search_box_input(const Ref<InputEvent> &p_
489489
}
490490

491491
void QuickOpenResultContainer::_move_selection_index(Key p_key) {
492+
// Don't move selection if there are no results.
493+
if (num_visible_results <= 0) {
494+
return;
495+
}
492496
const int max_index = num_visible_results - 1;
493497

494498
int idx = selection_index;

0 commit comments

Comments
 (0)