From aa5fd4faf848ca3ee854c5019a44f732987ebe6b Mon Sep 17 00:00:00 2001 From: Mathieu PATUREL Date: Sat, 7 Jan 2017 09:11:30 +1100 Subject: [PATCH] set main callback async (should help #6) --- MarkdownLivePreview.py | 2 +- sample.md | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/MarkdownLivePreview.py b/MarkdownLivePreview.py index 0ae50d4..824fe2a 100644 --- a/MarkdownLivePreview.py +++ b/MarkdownLivePreview.py @@ -19,7 +19,7 @@ class MarkdownLivePreviewListener(sublime_plugin.EventListener): preview = get_view_from_id(window, id) if id is None or preview is None: preview = create_preview(view) - sublime.set_timeout(lambda: show_html(view, preview), 1000) + sublime.set_timeout_async(lambda: show_html(view, preview), 1000) else: show_html(view, preview) diff --git a/sample.md b/sample.md index 2dabc06..2b17d38 100644 --- a/sample.md +++ b/sample.md @@ -10,9 +10,4 @@ Hope you'll enjoy using MarkdownLivePreview! ![image](http://local.dev/tests/php/img/image-php.php) -hello world - -This is a test dfsdf hello world, this is pretty cool. - -This is a test - +this is a tets