comigor/fuzzy

ResultDetails from search Result always have arrayIndex = -1

Closed this issue · 0 comments

All search results seem to return ResultDetails.arrayIndex = -1. Indeed, looking at fuzzy.dart, it seems there's some sort of mistake in the parameters of the method _analyze: there is a named parameter int arrayIndex = -1 and int index. When _analyze is called, only index is specified. Throughout the body of _analyze, index is used as the source of that search result index. But when the raw result list is updated, arrayIndex is passed to the ResultDetails constructor.

It seems fixing this is just removing the parameters arrayIndex and replacing its uses with index.