Support Ctrl-C to cancel ex-mode

This commit is contained in:
Edvin Hultberg 2017-07-27 16:13:48 +02:00
parent 4747bcf5e8
commit 26ac7c50b1
2 changed files with 5 additions and 1 deletions

View file

@ -15,7 +15,8 @@ class ExCommandModeInputElement extends HTMLDivElement
@editorContainer.style.height = "0px"
@editorElement = document.createElement "atom-text-editor"
@editorElement.classList.add('editor')
@editorElement.classList.add('editor') # Consider this deprecated!
@editorElement.classList.add('ex-mode-editor')
@editorElement.getModel().setMini(true)
@editorElement.setAttribute('mini', '')
@editorContainer.appendChild(@editorElement)
@ -40,6 +41,7 @@ class ExCommandModeInputElement extends HTMLDivElement
atom.commands.add(@editorElement, 'core:confirm', @confirm.bind(this))
atom.commands.add(@editorElement, 'core:cancel', @cancel.bind(this))
atom.commands.add(@editorElement, 'ex-mode:close', @cancel.bind(this))
atom.commands.add(@editorElement, 'blur', @cancel.bind(this))
backspace: ->