mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Use @command in MarkdownPreview extension
This commit is contained in:
@@ -15,11 +15,11 @@ class MarkdownPreview extends ScrollView
|
||||
|
||||
initialize: (@rootView) ->
|
||||
super
|
||||
@rootView.on 'markdown-preview:attach', =>
|
||||
@rootView.command 'markdown-preview:attach', =>
|
||||
path = rootView.getActiveEditor()?.getPath()
|
||||
@attach() if @isMarkdownFile(path)
|
||||
|
||||
@on 'markdown-preview:detach', => @detach()
|
||||
@command 'markdown-preview:detach', => @detach()
|
||||
|
||||
attach: ->
|
||||
@rootView.append(this)
|
||||
|
||||
Reference in New Issue
Block a user