]> git.r.bdr.sh - rbdr/dotfiles/blobdiff - atom/packages/vim-mode/lib/view-models/view-model.coffee
Merge master
[rbdr/dotfiles] / atom / packages / vim-mode / lib / view-models / view-model.coffee
index 9cc63e163b835cf7b289d697144db92679fbe9b1..b9da16956d6036ac774cbab695eab9d4f10807d4 100644 (file)
@@ -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) ->