philc/vimium — pull request #715 by smblott-github (2012-11-11 14:34:41+00:00)
Title: Remove entries from History/Domain completers when they're removed on chrome.

Currently, if a history entry is removed in chrome (or the entire history is removed), then the effects do not propagate into vimium until the next restart.

This is a pretty inconsistent UX.

The attached code fixes this inconsistency.

****

Also: I found a bug in `binarySearch`. It's noted in the unit tests file (for now).

In fact, there's a bug and secondary problem:
- Bug: `binarySearch` returns an index off the end of the array if the search term is greater than any entry in the array. Currently, none of the code using `binarySearch` is checking for this condition.
- Secondary problem: This bug is triggered if the history is cleared (because then *every* search is off the end of the array).