svgeditor icon indicating copy to clipboard operation
svgeditor copied to clipboard

Possible to force re-render after SVG file change?

Open etjones opened this issue 5 years ago • 1 comments

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!

etjones avatar Apr 07 '19 21:04 etjones

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

henoc avatar Apr 19 '19 07:04 henoc