minor fixes (see .tasks)
This commit is contained in:
@ -1,20 +1,27 @@
|
||||
todo:
|
||||
Fast:
|
||||
|
||||
☐ sync scroll @needsUpdate(because of images)
|
||||
☐ regive focus to the right markdown view
|
||||
☐ set the title of the preview
|
||||
☐ preview.set_scratch(True)
|
||||
☐ fix #4
|
||||
☐ bug when empty `src`
|
||||
☐ auto refresh preview if loading images
|
||||
☐ call settings listener on_new too
|
||||
☐ preview.wordWrap => True
|
||||
☐ 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
|
||||
|
||||
|
||||
|
||||
___________________
|
||||
Archive:
|
||||
✔ clean the code (syntax) @done (17-01-02 16:27) @project(todo)
|
||||
✔ add 404 image @done (17-01-02 16:27) @project(todo)
|
||||
✔ preview.set_scratch(True) @done (17-01-02 16:41) @project(Fast)
|
||||
✔ 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)
|
||||
|
||||
@ -119,14 +119,18 @@ def create_preview(window, md_view):
|
||||
focus_group, focus_view = window.get_view_index(md_view)
|
||||
preview = window.new_file()
|
||||
window.run_command('new_pane') # move the preview to a new group
|
||||
preview.set_name(os.path.basename(md_view.file_name() or 'Untilted')
|
||||
+ ' - Preview')
|
||||
name = md_view.name() or os.path.basename(md_view.file_name()) \
|
||||
or 'Untitled'
|
||||
preview.set_name(name + ' - Preview')
|
||||
preview.set_scratch(True)
|
||||
|
||||
preview_settings = preview.settings()
|
||||
preview_settings.set('gutter', False)
|
||||
preview_settings.set('word_wrap', True)
|
||||
preview_settings.set('is_markdown_preview', True)
|
||||
preview_settings.set('markdown_view_id', md_view.id())
|
||||
|
||||
|
||||
md_view.settings().set('markdown_preview_id', preview.id())
|
||||
window.focus_group(focus_group)
|
||||
window.focus_view(md_view)
|
||||
|
||||
Reference in New Issue
Block a user