minor fixes (see .tasks)
This commit is contained in:
@ -1,20 +1,27 @@
|
|||||||
todo:
|
Fast:
|
||||||
|
|
||||||
☐ sync scroll @needsUpdate(because of images)
|
☐ sync scroll @needsUpdate(because of images)
|
||||||
☐ regive focus to the right markdown view
|
☐ regive focus to the right markdown view
|
||||||
☐ set the title of the preview
|
|
||||||
☐ preview.set_scratch(True)
|
|
||||||
☐ fix #4
|
|
||||||
☐ bug when empty `src`
|
☐ bug when empty `src`
|
||||||
☐ auto refresh preview if loading images
|
|
||||||
☐ call settings listener on_new too
|
☐ call settings listener on_new too
|
||||||
☐ preview.wordWrap => True
|
|
||||||
☐ try/except for 404
|
☐ try/except for 404
|
||||||
|
|
||||||
|
Medium:
|
||||||
|
☐ auto refresh preview if loading images
|
||||||
|
☐ cache image in object when used, so that it's faster @needsTest
|
||||||
|
☐ use MarkdownLivePreview syntax, so we can use syntax's settings
|
||||||
|
|
||||||
|
Long:
|
||||||
|
☐ fix #4
|
||||||
☐ support hanchor (TOC) @big
|
☐ support hanchor (TOC) @big
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
___________________
|
___________________
|
||||||
Archive:
|
Archive:
|
||||||
✔ clean the code (syntax) @done (17-01-02 16:27) @project(todo)
|
✔ preview.set_scratch(True) @done (17-01-02 16:41) @project(Fast)
|
||||||
✔ add 404 image @done (17-01-02 16:27) @project(todo)
|
✔ set the title of the preview @done (17-01-02 16:38) @project(Fast)
|
||||||
|
✔ preview.wordWrap => True @done (17-01-02 16:31) @project(Fast)
|
||||||
|
✔ clean the code (syntax) @done (17-01-02 16:27) @project(Medium)
|
||||||
|
✔ add 404 image @done (17-01-02 16:27) @project(Medium)
|
||||||
✔ load images from internet (`https:`) @done (17-01-02 15:51) @project(todo)
|
✔ load images from internet (`https:`) @done (17-01-02 15:51) @project(todo)
|
||||||
|
|||||||
@ -119,14 +119,18 @@ def create_preview(window, md_view):
|
|||||||
focus_group, focus_view = window.get_view_index(md_view)
|
focus_group, focus_view = window.get_view_index(md_view)
|
||||||
preview = window.new_file()
|
preview = window.new_file()
|
||||||
window.run_command('new_pane') # move the preview to a new group
|
window.run_command('new_pane') # move the preview to a new group
|
||||||
preview.set_name(os.path.basename(md_view.file_name() or 'Untilted')
|
name = md_view.name() or os.path.basename(md_view.file_name()) \
|
||||||
+ ' - Preview')
|
or 'Untitled'
|
||||||
|
preview.set_name(name + ' - Preview')
|
||||||
|
preview.set_scratch(True)
|
||||||
|
|
||||||
preview_settings = preview.settings()
|
preview_settings = preview.settings()
|
||||||
preview_settings.set('gutter', False)
|
preview_settings.set('gutter', False)
|
||||||
|
preview_settings.set('word_wrap', True)
|
||||||
preview_settings.set('is_markdown_preview', True)
|
preview_settings.set('is_markdown_preview', True)
|
||||||
preview_settings.set('markdown_view_id', md_view.id())
|
preview_settings.set('markdown_view_id', md_view.id())
|
||||||
|
|
||||||
|
|
||||||
md_view.settings().set('markdown_preview_id', preview.id())
|
md_view.settings().set('markdown_preview_id', preview.id())
|
||||||
window.focus_group(focus_group)
|
window.focus_group(focus_group)
|
||||||
window.focus_view(md_view)
|
window.focus_view(md_view)
|
||||||
|
|||||||
Reference in New Issue
Block a user