editor: Make `SelectNext` and `SelectPrevious` preserve cursor direction (#29293)

Closes #27652

Now, if the last selection is reversed, subsequent `SelectNext` or
`SelectPrevious` selection will also be reversed.


https://github.com/user-attachments/assets/dff31abf-ac9e-4d35-bd2c-34e7b0f3ca23

Release Notes:

- Fixed an issue where `SelectNext` and `SelectPrevious` did not
preserve the last selection's cursor direction.
636c6e7f2dSmit Barmase committed on 4/23/2025, 6:47:17 PM· committed by GitHubparent45d3f51
2 files changedLine totals unavailable