excalidraw / excalidraw-vscode

Excalidraw for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor
MIT License
477 stars 60 forks source link

Opening an excalidraw diagram changes something inside and shows in git pending changes #94

Open bjesuiter opened 1 year ago

bjesuiter commented 1 year ago

When I open an excalidraw diagram with the extension, It seems to change something inside the file, since VSCode shows me the 'unsaved changes' indicator and git shows me the file as changed.

This is incredibly annoying, since I don't know anymore whether I did something to a file or if I simply took a look at it.

Can you at least provide a setting which says: "Avoid all write processes until something really changed in the file" ?

DavidRojoM commented 1 year ago

Happens to me also, seems to be updating version and versionNonce fields for each file open

bjesuiter commented 1 year ago

Can someone, who's in charge, comment on whether this could be changed? I can see that we only want to change the version and versionNonce Fields after an actual edit. Or at least, make it configureable in vscode to stop this behavior.

pomdtr commented 1 year ago

This is not a simple fix. The extension export your drawing to a JSON file each time a change is reported, and sometimes a change is reported while the drawing did not changes.

The extension does not have control over the version fields. If it was that easy, it would already be fixed.

bjesuiter commented 1 year ago

@pomdtr Ah ok, I see. Is there an upstream repo somewhere where we might be able to get this fixed directly in excalidraw core?

karanshah229 commented 1 year ago

Facing the same issue 😞 Is there a hack / fix anyone has found ?