### Describe the issue **Steps to replicate the issue**: * Start editing something long enough there is a scrollbar * Scroll to bottom (`Ctrl`+`End`) * Enter something * Do an undo (`Ctrl`+`Z`) * Scroll to top (`Ctrl`+`Home`) * Do a redo (`Ctrl`+`Y`) * Do an undo (`Ctrl`+`Z`) **Actual behavior**: The cursor goes to top (and so does the scroll view), so it's not clear what was just undone. https://github.com/user-attachments/assets/ffe7f0da-ce7f-47cd-9c81-36e6abf6e787 **Expected behavior**: The cursor stays adjacent to the chunk that was changed, so it's clear what was just undone. https://github.com/user-attachments/assets/4afc5244-a422-431c-afce-c358f6046b13 (Ace) ### Browser and platform Firefox 147, Win11 ### Reproduction link https://en.wikipedia.org/w/index.php?title=Florida_State_Road_568&action=edit&cm6enable=1