diff --git a/lib/view-model.coffee b/lib/view-model.coffee index 5e761b1..af96e77 100644 --- a/lib/view-model.coffee +++ b/lib/view-model.coffee @@ -7,12 +7,16 @@ class ViewModel @view = new ExCommandModeInputElement().initialize(@, opts) @editor.commandModeInputView = @view @exState.onDidFailToExecute => @view.remove() + @done = false confirm: (view) -> @exState.pushOperations(new Input(@view.value)) + @done = true cancel: (view) -> - @exState.pushOperations(new Input('')) + unless @done + @exState.pushOperations(new Input('')) + @done = true class Input constructor: (@characters) ->