protected void onSpeedSearchPatternChanged() { myListModel.refilter(); if (myListModel.getSize() > 0) { if (!autoSelectUsingStatistics()) { int fullMatchIndex = myListModel.getClosestMatchIndex(); if (fullMatchIndex != -1) { myList.setSelectedIndex(fullMatchIndex); } if (myListModel.getSize() <= myList.getSelectedIndex() || !myListModel.isVisible(myList.getSelectedValue())) { myList.setSelectedIndex(0); } } } }