BennyKok / novel-vscode

A quick integration of Novel.sh editor to VSCode
https://marketplace.visualstudio.com/items?itemName=bennykok.novel-vscode
MIT License
61 stars 7 forks source link

Fix using Novel in more than 1 tab #11

Open mpiniarski opened 11 months ago

mpiniarski commented 11 months ago

When opening more than 1 tab, one file's content seems to override another file's content.

https://github.com/BennyKok/novel-vscode/assets/11861292/f453a794-3957-4709-a3d9-775df53a7ab7

The probable issue is the extension does not reload the Novel's state on switching tabs / opening a new file.

BennyKok commented 11 months ago

This is probably due to how novel uses local storage as caching, while in the web view they shared the same origin, thus using the same cache. Thanks for reporting. Which version are you on?

BennyKok commented 11 months ago

could be relevant, referencing here https://github.com/steven-tey/novel/issues/170

steven-tey commented 11 months ago

Apologies for the delay here!

novel@0.1.21 now has a new disableLocalStorage prop that lets you disable reading / writing content from local storage!

Check out the release: https://github.com/steven-tey/novel/releases/tag/0.1.21

BennyKok commented 11 months ago

Thanks, steven!