Difference between all items and whole items is as follows:
all items -> items matching the criteria even partially,
e.g. all items on the left of edit cursor
includes item that is only partially on the left of edit cursor,
whole items -> items matching the criteria fully,
e.g. whole items on the right of edit cursor
doesn't include item that is only partially on the right of edit
cursor.
You can view/download raw script using convenient shortlinks: