Undo/redo does not scroll to the right place

Scott Vivian 8 lat temu 0

To reproduce:

1. Open a long file.

2. Scroll down a bit and type something.

3. Scroll down a bit more and undo, then redo.

4. Scroll down more and undo/redo.

When I undo or redo, the cursor keep jumping up and down the page to wherever the cursor was last time I did and undo/redo. But it should jump to WHERE the actual undo/redo is occurring, i.e. if a redo adds some text, the cursor should be where that text is added.