stop spurious cancels
This commit is contained in:
parent
3c17b6e670
commit
c43b2658ef
1 changed files with 5 additions and 1 deletions
|
|
@ -7,12 +7,16 @@ class ViewModel
|
||||||
@view = new ExCommandModeInputElement().initialize(@, opts)
|
@view = new ExCommandModeInputElement().initialize(@, opts)
|
||||||
@editor.commandModeInputView = @view
|
@editor.commandModeInputView = @view
|
||||||
@exState.onDidFailToExecute => @view.remove()
|
@exState.onDidFailToExecute => @view.remove()
|
||||||
|
@done = false
|
||||||
|
|
||||||
confirm: (view) ->
|
confirm: (view) ->
|
||||||
@exState.pushOperations(new Input(@view.value))
|
@exState.pushOperations(new Input(@view.value))
|
||||||
|
@done = true
|
||||||
|
|
||||||
cancel: (view) ->
|
cancel: (view) ->
|
||||||
|
unless @done
|
||||||
@exState.pushOperations(new Input(''))
|
@exState.pushOperations(new Input(''))
|
||||||
|
@done = true
|
||||||
|
|
||||||
class Input
|
class Input
|
||||||
constructor: (@characters) ->
|
constructor: (@characters) ->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue