aboutsummaryrefslogtreecommitdiff
path: root/atom/packages/vim-mode/lib/view-models/view-model.coffee
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2015-09-28 12:39:59 -0500
committerBen Beltran <ben@nsovocal.com>2015-09-28 12:39:59 -0500
commit455f099b504ec07dd492ab31987ae05a6f6774c7 (patch)
tree22b0c7fd8e492733b97e661750a2d79c46da451d /atom/packages/vim-mode/lib/view-models/view-model.coffee
parent24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a (diff)
Adds atom packages
Diffstat (limited to 'atom/packages/vim-mode/lib/view-models/view-model.coffee')
-rw-r--r--atom/packages/vim-mode/lib/view-models/view-model.coffee7
1 files changed, 4 insertions, 3 deletions
diff --git a/atom/packages/vim-mode/lib/view-models/view-model.coffee b/atom/packages/vim-mode/lib/view-models/view-model.coffee
index 9cc63e1..b9da169 100644
--- a/atom/packages/vim-mode/lib/view-models/view-model.coffee
+++ b/atom/packages/vim-mode/lib/view-models/view-model.coffee
@@ -1,10 +1,10 @@
-VimCommandModeInputElement = require './vim-command-mode-input-element'
+VimNormalModeInputElement = require './vim-normal-mode-input-element'
class ViewModel
constructor: (@operation, opts={}) ->
{@editor, @vimState} = @operation
- @view = new VimCommandModeInputElement().initialize(this, opts)
- @editor.commandModeInputView = @view
+ @view = new VimNormalModeInputElement().initialize(this, atom.views.getView(@editor), opts)
+ @editor.normalModeInputView = @view
@vimState.onDidFailToCompose => @view.remove()
confirm: (view) ->
@@ -13,6 +13,7 @@ class ViewModel
cancel: (view) ->
if @vimState.isOperatorPending()
@vimState.pushOperations(new Input(''))
+ delete @editor.normalModeInputView
class Input
constructor: (@characters) ->