diff --git a/MLPApi.py b/MLPApi.py index a238258..e8790f6 100644 --- a/MLPApi.py +++ b/MLPApi.py @@ -81,7 +81,7 @@ def show_html(md_view, preview): # remove half of the viewport_extent.y to center it on the screen (verticaly) vector[1] -= preview.viewport_extent()[1] / 2 # make sure the minimum is 0 - vector[1] = 0 if vector < 0 else vector[1] + vector[1] = 0 if vector[1] < 0 else vector[1] # the hide the first line vector[1] += preview.line_height() preview.set_viewport_position(vector, animate=False) diff --git a/README.md b/README.md index 7a42b39..e725849 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Note: MarkdownLivePreview will actualy look in this file for settings that aren' - `show_sidebar` - `show_menus` -They talk for themself, don't they? All of them takes a boolean (`true` or `false`). Note that those settings are *window* specific, not just view specific (that's why they aren't supported). It means that they'll affect the entire window, and every view in it. +They talk for themself, don't they? All of them takes a boolean (`true` or `false`). Note that those settings are *window* specific, not just view specific (that's why they aren't supported). It means that they'll affect the entire window, and every view in it. Here is an example of syntax specific settings for MarkdownLivePreviewSyntax: diff --git a/sample.md b/sample.md index 6ba6079..f116750 100644 --- a/sample.md +++ b/sample.md @@ -50,5 +50,3 @@ e s t - -sdfsdfsdf