use setting for delay before updating preview

This commit is contained in:
Mathieu PATUREL
2017-03-22 17:40:20 +11:00
parent 6a3dd6ac2f
commit 7126c0e090
2 changed files with 5 additions and 2 deletions

View File

@ -48,7 +48,7 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener):
def update(self, view):
vsettings = view.settings()
now = time.time()
if now - vsettings.get(LAST_RUN, 0) < 0.8:
if now - vsettings.get(LAST_RUN, 0) < get_settings().get('update_preview_every'):
return
vsettings.set(LAST_RUN, now)
if not vsettings.get(PREVIEW_ENABLED):