Remove autocomplate:toggle, replace with autocomplete:attach and autocomplete:cancel

This commit is contained in:
Corey Johnson
2012-04-20 08:41:56 -07:00
parent 56a55299be
commit 01865e07fd
3 changed files with 4 additions and 10 deletions

View File

@@ -33,8 +33,7 @@ class Autocomplete extends View
@editor.on 'buffer-path-change', => @setCurrentBuffer(@editor.buffer)
@editor.on 'before-remove', => @currentBuffer?.off '.autocomplete'
@editor.on 'autocomplete:toggle', => @attach()
@on 'autocomplete:toggle', => @detach()
@editor.on 'autocomplete:attach', => @attach()
@on 'autocomplete:confirm', => @confirm()
@on 'autocomplete:cancel', => @cancel()

View File

@@ -1,5 +1,5 @@
window.keymap.bindKeys '.editor',
'escape': 'autocomplete:toggle'
'escape': 'autocomplete:attach'
window.keymap.bindKeys '#autocomplete .editor',
'enter': 'autocomplete:confirm'