make jump to letter move to first occurrence of the letter

This commit is contained in:
Jools Wills 2017-03-13 18:16:57 +00:00
parent f84fcfa62b
commit baa4e2590d

View file

@ -104,7 +104,7 @@ void GuiGamelistOptions::jumpToLetter()
if(checkLetter < letter)
min = mid + 1;
else if(checkLetter > letter)
else if(checkLetter > letter || (mid > 0 && (letter == toupper(files.at(mid - 1)->getName()[0]))))
max = mid - 1;
else
break; //exact match found