Skip adding initial `1:1` cursor position to selection history (#32432)

Also improves some minor corner cases in `undo_selection` and
`redo_selection` related to the use of `end_selection`. If the pending
selection was ended, this would separately get pushed to the redo or
undo stack and redundantly run all the other effects of selection
change.

Release Notes:

- N/A
6070aea6c0Michael Sloan committed on 6/10/2025, 4:22:46 AM· committed by GitHubparent16b44d5
1 file changedLine totals unavailable