X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a..42178d7b5bc16fae8c74a39d859350f0dc5faffb:/atom/packages/vim-mode/lib/view-models/view-model.coffee?ds=inline 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) ->