Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cells recovered with the "z" shortcut are not saved #4058

Closed
alanhett opened this issue Dec 1, 2020 · 4 comments
Closed

Cells recovered with the "z" shortcut are not saved #4058

alanhett opened this issue Dec 1, 2020 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@alanhett
Copy link

alanhett commented Dec 1, 2020

Environment data

  • VS Code version: 1.51.1
  • Jupyter Extension version (available under the Extensions sidebar): v2020.11.392013122
  • Python Extension version (available under the Extensions sidebar): v2020.11.371526539
  • OS (Windows | Mac | Linux distro) and version: Windows 10
  • Python and/or Anaconda version: 3.8.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Jupyter server running: Local

Expected behaviour

When I delete a cell, then bring it back using the "z" shortcut key, it should save this change and keep the recovered cell.

Actual behaviour

When I delete a cell, then bring it back using the "z" shortcut key, then if I save the file and close and reopen it, the cell is permanently lost. It doesn't save the recovered cell.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Create a new jupyter notebook and create a couple of cells, enter some arbitrary code
  2. Delete a cell using the trash can icon at the right side of the cell
  3. Recover the cell by pressing the "z" key (while no cells are selected)
  4. Save the notebook and close it
  5. Reopen the notebook, the cell is missing
@alanhett alanhett added the bug Issue identified by VS Code Team member as probable bug label Dec 1, 2020
@IanMatthewHuff
Copy link
Member

@alanhett Thanks for the report on this. I just gave it a try and I repro the same issue. When the cell comes back with 'z' the cell reappears, but the file doesn't correctly get marked as dirty and the change is not saved if you close. We'll triage this issue.

@alanhett
Copy link
Author

alanhett commented Dec 2, 2020

Thanks @IanMatthewHuff , by the way I also attempted to make the file "dirty" by making some arbitrary changes w/in the cell and w/in other cells (like between steps 3 and 4 above), and it still would lose the cell.

@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Dec 2, 2020

@alanhett Yeah it's reflecting that change visually, but not in the backing data. We'll have to clean this up.

@IanMatthewHuff
Copy link
Member

Validated. Removed the cell and did an undo command. After that, the cell was back, file was not dirty and the cell was still there after opening and closing.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants