New search system: Flag if match is exact

This commit is contained in:
Guangcong Luo 2013-04-19 23:18:33 -07:00
parent 576ba2e2ef
commit 8f5f37ff9e

View File

@ -50,11 +50,13 @@
this.q = query;
if (!query) {
this.el.innerHTML = '';
this.exactMatch = false;
return true;
}
var i = Search.getClosest(query);
if (!BattleSearchIndex[i]) i--;
this.exactMatch = (query === BattleSearchIndex[i]);
var bufs = ['','','',''];