tomoki1207 / vscode-pdfviewer

Show PDF preview in VSCode.
https://marketplace.visualstudio.com/items/tomoki1207.pdf
Other
295 stars 70 forks source link

Reload debouncing #112

Open phiresky opened 3 years ago

phiresky commented 3 years ago

When compiling a LaTeX document, it will be rewritten multiple times. Currently, this causes vscode-pdf to completely lose the position the PDF viewer was at since it tries to reload the PDF before it is fully rewritten, and sometimes also causes it to show an "invalid PDF" error message instead.

It would be great if there was an option (or default) of adding a debounce to the reload function: Then it will only reload the document if it remains unchanged for e.g. 2 seconds.