mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
💄 (this was added so the function could be one line instead of two)
This commit is contained in:
committed by
Corey Johnson
parent
144fb29d83
commit
cdc4da2f7d
@@ -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()
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user