goessner / mdmath

LaTeX Math for Markdown inside of Visual Studio Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autosave doesn't work without a reload of the extension.

MrF3lix opened this issue · comments

Summary

I installed the extension and used it for a while. Then I set the mdmath.autosave setting to true but nothing happened. Once I checked the code I saw that the initWatching function is only called when activating the extension. So once I disabled and re-enabled the extension it worked as exepcted.

Expected behavior

When I adjust the autosave setting the watcher should be enabled directly. The same goes for disabling the setting.

Actual behavior

Autosave is not enabled once the setting is set. Only after disabling and re-enabling of the extension.

Steps to reproduce

  1. Install the extension.
  2. Use the extension.
  3. Set the mdmath.autosave to true
  4. Files that are not automatically saved as html.

Environment

Operating system: macOs Big Sur v11.1
VSCode version: v1.52.1
Markdown+Math version: v2.5.1

If you want I can prepare a PR for this.

@MrF3lix ... thanks for finding,understanding and offering a fix for this behavior.

It would be great, if you can do a PR for this. Otherwsie I would extend the docs for the need to disable and re-enable the extension in that case.

thanks

--
sg

Commented in FaQ's ...

Commented in FaQ's ...

Be sure to have closed and opened VSCode again after having changed settings.

This doesn't work, and neither does any other combination of enabling/disabling/reloading/changing the Markdown file inbetween. The manual Ctrl K, is unaffected.

System Win10, VScode 1.66 portable