Open krassowski opened 3 months ago
It looks like we need something like this._undoManager.on('stack-item-popped', this._onStackItemPopped)
. For now I would propose to add it for text documents as in notebooks the behaviour is more complex.
Then, I wonder how is selection set currently if _onStackItemPopped
is not implemented?
This is one of the most frustrating things for me when using JupyterLab and it prevents me from working productively with larger files
Well, I'm not alone: https://stackoverflow.com/questions/78818736/follow-changes-with-the-mouse-cursor-when-pressing-ctrl-z-z-undo-redo-in-jup
I do not have rights to tag issues here, but if I could I would tag it with https://github.com/jupyter-server/jupyter_ydoc/labels/help%20wanted
Description
This is one of the most frustrating things for me when using JupyterLab and it prevents me from working productively with larger files - see https://github.com/jupyterlab/jupyterlab/issues/15102
Reproduce
See https://github.com/jupyterlab/jupyterlab/issues/15102
Expected behavior
Editor scrolls on undo/redo if the new selection is outside of the viewport.
Context
This was just fixed in y-codemirror.next: https://github.com/yjs/y-codemirror.next/pull/34 but
jupyter_ydoc
does not use that and has its own integration of undo manager.