in src/org/jetbrains/r/visualization/inlays/table/filters/gui/editor/PopupComponent.java [201:230]
public ChoiceMatch selectBestMatch(Object hint) {
ChoiceMatch hMatch = historyModel.getClosestMatch(hint);
if (choicesModel.getSize() > 0) {
ChoiceMatch match = choicesModel.getBestMatch(hint);
if (isVisible() && (match.index >= 0)) {
choicesList.ensureIndexIsVisible(match.index);
}
if (match.exact || (!hMatch.exact && (match.len >= hMatch.len))) {
if (match.index >= 0) {
if (isVisible()) {
focusChoices();
select(match.index);
}
}
return match;
}
}
if (hMatch.index != -1) {
if (isVisible()) {
focusHistory();
select(hMatch.index);
}
}
return hMatch;
}