joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.55k stars 36 forks source link

Nukes cells after navigating #10

Closed Peder2911 closed 3 years ago

Peder2911 commented 3 years ago

Hey!

I am amazed at this tool. Very useful! I have unfortunately found an issue which renders it near-unusable for me.

I edit cells with an external editor, but sometimes cells "revert" to their previous content after saving and navigating away from the cell. For example, I add some code using my editor (Neovim), save the code and drop back into Euporie. Randomly, cells suddenly become empty if I navigate away from them, or run them.

Any idea why this might be? I could maybe contribute a solution if you could point me in the right direction. P

joouha commented 3 years ago

Hi - I'm so glad you like euporie :smile:

Thanks for reporting this. It looks like I forgot to actually save the changed text to the notebook JSON when the editor was closed. This meant that although the screen was updated after an edit, if you navigate away from the cell then come back, the cell is redrawn from the notebook JSON data, which is why it reverted back to it's original value.

It's been fixed it in 4dcfc701d0c4d511c68baf83b30c1264c1759b51, and I've made a new release, so if you upgrade to v0.1.5 euporie should be usable for you.

Peder2911 commented 3 years ago

You are brilliant! Thank you.