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

Possible to force re-render after SVG file change? #48

Open
etjones opened this issue Apr 7, 2019 · 1 comment
Open

Possible to force re-render after SVG file change? #48

etjones opened this issue Apr 7, 2019 · 1 comment

Comments

@etjones
Copy link

etjones commented Apr 7, 2019

Thanks for this project! It's great to be able to edit files and see the preview side-by-side in VS Code.

Sometimes, when I make a change in the text of the SVG file, the preview updates, even before I save the file. That's great! I'm generating the SVG file with some code, though, and when I re-run the generation program, the preview often doesn't seem to update. Sometimes it does update, but not always. The only pattern I've noticed is that the longer I've been looking away from the preview, the more likely the preview is to not update.

Would it be possible to have a 'Force SVG Preview Refresh' command? A file watch might be nice, but given the way the plugin currently watches the SVG file buffer before it's even saved, this might be harder than just re-rendering from whatever's on disk.

Thanks!

@henoc
Copy link
Owner

henoc commented Apr 19, 2019

This means that vscode.workspace.onDidChangeTextDocument may not fire for file updates on disk. I think a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants