microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.27k stars 283 forks source link

Cannot undo delete cell #791

Closed nklick closed 3 years ago

nklick commented 4 years ago

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Accidentally deleted multiple cells by double clicking the garbage can icon in the top right corner of the cell.
  2. Attempted to recover cell by pressing Z.

Actual behavior

Note: I am not using VSCode until this has been solved. It's insane that a double click can delete hours of work permanently.

Expected behavior

Your Jupyter and/or Python environment

Please provide as much info as you readily know

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

joyceerhl commented 4 years ago

Hi @nklick, sorry for the trouble and thank you for reporting this issue. This sounds like the undo stack got corrupted, but it seems like it might be difficult to repro, as I just tried undoing cell deletions locally and 'z' currently works for me. Would you mind providing more details about how this bug occurred? Did you have the cell selected when you were pressing 'z' (i.e. the side of the cell was highlighted in blue) without effect? Had you left the notebook open in a VS Code session for a week and recently come back to it?

joyceerhl commented 4 years ago

Also, I noticed that you filed a related bug on the VSCode repo https://github.com/microsoft/vscode/issues/103854. You can create a copy of a notebook by selecting the file in the file explorer pane and hitting cmd+c and cmd+v. Please let me know if that doesn't work for you.