betsegaw/windowwalker

Search is broken for more than 1 letter

betsegaw opened this issue · 1 comments

Search does not match anything after the first letter (see screenshots for example) starting from commit 64d6a32

For one letter you get:
screenshot_windowwalker_searchbroken_1_letter

When you add 2 you get:
screenshot_windowwalker_searchbroken_2_letters

@mjrichmond I hadn't noticed that commit. I am reverting it for the following two reasons,

  1. It is more useful to have score based on overall distribution of letters.(eg. for a search of "moo", "mxxoxxo" should score higher than "mxxxxxxoxxxxxxxxo")
  2. The original one has been "overused" by me so a bunch of corner cases were discovered and accounted for. Even though there are tests bundled along with the old one, there is not enough coverage to verify the new one thoroughly (as shown by the bug). I should have invested a little bit more time in creating more tests but I had gotten lazy lol :)

Fixed by revert commit 7c7795e