No longer push empty batches onto undo stack

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-04-10 10:25:22 -07:00
parent afceacefc8
commit fa50e9705e
2 changed files with 10 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ class UndoManager
endUndoBatch: (ranges) ->
@currentBatch.newSelectionRanges = ranges
@undoHistory.push(@currentBatch)
@undoHistory.push(@currentBatch) if @currentBatch.length > 0
@currentBatch = null
preservingHistory: (fn) ->