Add explanatory comment

Leo and I were looking over this code and I couldn't remember what it
was doing.  So after I re-derived its purpose, we figured that an
explanatory comment was in order.

(imported from commit ce984362e2b504b40f3d3586777bd73691ad5ea7)
This commit is contained in:
Zev Benjamin 2013-11-12 14:35:10 -05:00
parent 673f497a6f
commit 3f0fa363f9
1 changed files with 5 additions and 0 deletions

View File

@ -218,6 +218,11 @@ MessageList.prototype = {
if (closest === items.length
|| (closest !== 0
// We have the index at which a message with the
// given id would be inserted, but that isn't
// necessarily the index of the message that has an
// id that is closest to the query; it could be the
// previous message in the list.
&& (id - items[closest - 1].id <
items[closest].id - id)))
{