mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Markdown preview listens to core:save on activate
This commit is contained in:
committed by
probablycorey
parent
5c93fd4574
commit
e03f2fd738
@@ -4,6 +4,7 @@ MarkdownPreviewView = require 'markdown-preview/lib/markdown-preview-view'
|
||||
module.exports =
|
||||
activate: ->
|
||||
rootView.command 'markdown-preview:show', '.editor', => @show()
|
||||
rootView.on 'core:save', ".pane", => @show()
|
||||
|
||||
show: ->
|
||||
activePane = rootView.getActivePane()
|
||||
@@ -13,8 +14,6 @@ module.exports =
|
||||
console.warn("Can not render markdown for #{item.getUri()}")
|
||||
return
|
||||
|
||||
activePane.on 'core:save', => @show()
|
||||
|
||||
editSession = item
|
||||
if nextPane = activePane.getNextPane()
|
||||
if preview = nextPane.itemForUri("markdown-preview:#{editSession.getPath()}")
|
||||
|
||||
Reference in New Issue
Block a user