Use Editor.abort to clear autocomplete's buffer changes on cancel

Using this new `abort` mechanism ensures that autocomplete's changes can never be redone, while eliminating the need to track operation counts explicitly.
This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-01-04 12:44:44 -07:00
parent ec13c38c7d
commit 29f371b347
3 changed files with 25 additions and 10 deletions

View File

@@ -246,6 +246,9 @@ class Editor extends View
paste: -> @activeEditSession.pasteText()
undo: -> @activeEditSession.undo()
redo: -> @activeEditSession.redo()
transact: (fn) -> @activeEditSession.transact(fn)
commit: -> @activeEditSession.commit()
abort: -> @activeEditSession.abort()
createFold: (startRow, endRow) -> @activeEditSession.createFold(startRow, endRow)
foldCurrentRow: -> @activeEditSession.foldCurrentRow()
unfoldCurrentRow: -> @activeEditSession.unfoldCurrentRow()