💄 (this was added so the function could be one line instead of two)

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-04-10 17:05:45 -07:00
committed by Corey Johnson
parent 144fb29d83
commit cdc4da2f7d
2 changed files with 4 additions and 6 deletions

View File

@@ -32,11 +32,11 @@ class CommandPanel extends View
toggle: ->
if @parent().length then @hide() else @show()
show: ->
show: (text='') ->
@rootView.append(this)
@prompt.css 'font', @editor.css('font')
@editor.focus()
@editor.buffer.setText('')
@editor.buffer.setText(text)
hide: ->
@detach()

View File

@@ -25,10 +25,8 @@ class RootView extends View
@createProject(path)
@on 'toggle-file-finder', => @toggleFileFinder()
@on 'show-console', -> window.showConsole()
@on 'find-in-file', =>
@commandPanel.show()
@commandPanel.editor.setText("/")
@on 'show-console', => window.showConsole()
@on 'find-in-file', => @commandPanel.show("/")
@one 'attach', => @focus()
@on 'focus', (e) =>