This keeps happening to me all the time, when I expand and select several nested items, and try to delete them. It’s somewhat alarming when I’m asked if I’m sure I want to delete a much larger number of items than I expected, which goes up exponentially (well, not actually exponentially, as I figured out) the deeper the items are nested. I got very curious, because I could see a pattern in the numbers to delete, but it took some time to understand what it was.
I don’t know what’s actually going on with the code, but one way to describe it is that even-numbered generations of descendants have their descendants added twice to the count of items to be deleted, recursively. In this example there are items 1-11 in the document, @ 1-6 levels of indentation:
If I collapse the first item, or just select it only, and try to delete, it correctly asks me if I’m sure I want to delete 11 items. But if I drag over and select all the items, I get this:
11 + 9 + 1 + 2 = 23 items to delete. This happens with any other combination I’ve tried.
I also found that this feature of Legend gives the ability to multiply any two numbers, just using addition and subtraction. Say you want to multiply 3 × 8. Take the sum and difference: 11 and 5. Create an outline of indented items, starting at 0, and going to 11 and to 5:
Then select and delete the items in the first outline. Subtract the actual number of items, 12, from the number you’re asked if you’re sure you want to delete, which is 42, giving 30. Do the same with 5. You’ll get 6. Subtract 6 from 30, giving you 24, which is 3 × 8. This works with any two numbers, without limit.
It also represents the highest number of identical items you’d have collected as of any of the 12 days of Christmas, which is equal to the number of items you’re asked whether you’re sure you want to delete:
It can even calculate the maximum number of slices of pizza you can cut, using only parallel and perpendicular cuts, by creating a nested outline with one more item than the number of cuts. So it’s actually really practical, and I’m sure there are a lot of other uses I haven’t found yet. Perhaps it could all be explained in the help document? Maybe it should become a paid feature?