Make cursor move to duplicated line when duplicating line up (#41004)

![Screen Recording 2025-10-23 at 14 50
26](https://github.com/user-attachments/assets/3427aa06-faf4-4f76-a604-bfc5af30f8ce)

Closes #40919
Follow-up of #39610

Release Notes:
- When duplicating line up, fixed cursor to move to the duplicated line
79eff1fe05Tom Planche committed on 10/23/2025, 11:20:16 PM· committed by GitHubparentaf0d2ad
2 files changedLine totals unavailable