Jupyter lab: ctrl + z shortcut only for selected cell rather than all modified ones

Viewed 1610

Here we go...

Recently with the new update of Jupyter Lab when I press the "ctrl+z" command the recovery process applies for all cells I modified before and I want only the cell I selected to be modified. How could I fix that?

2 Answers

Recently I've also experienced the same frustrating problem. I'm adding a picture to illustrate how to disable document-wide undo/redo here.

JupyterLab -> Settings -> Advanced Settings Editor -> Notebook -> Ctrl-F to find "undo" -> check the box "Experimental settings to...".

After that remember to close and re-open JupyterLab

enter image description here

This is due to a document wide history function introduced in JupyterLab 3.2.

You have either to:
1- disable document wide undo redo (in in Advanced Settings Editor → Notebook,)

 "experimentalDisableDocumentWideUndoRedo": true,

and reload the page.
Or
2- install a 3.1 jupyterlab with pip install "jupyterlab<=3.1" or if conda conda install -c conda-forge "jupyterlab<=3.1"

See: @krassowski answer: How to undo/redo changes inside the selected cell in Jupyter notebook?

Related Github issue: https://github.com/jupyterlab/jupyterlab/issues/10791

Related Changelog: https://jupyterlab.readthedocs.io/en/stable/getting_started/changelog.html#id116

Related