Difference between head/anchor and to/from

What is the difference between the unresolved head and anchor and the unresolved from and to?

The anchor is the side of the selection that stays in place when shift-selecting. from/to are always the lower and upper bound of the range (so Math.min(head, anchor) and Math.max(head, anchor)).

2 Likes