Add redo state

This commit is contained in:
Jacob Schatz 2016-05-26 22:12:05 -04:00 committed by Phil Hughes
parent 3e7770aae1
commit ad1d55eb9c

View file

@ -77,6 +77,9 @@
unique = gl.text.undoManager.addUniqueIfNotExists($thisTextarea)
if not gl.text.undoManager.undoHistory[unique].length
return
latestUndo = gl.text.undoManager.undoHistory[unique].pop()
gl.text.undoManager.history[unique].push(latestUndo)
$thisTextarea.val(latestUndo.newVal)
gl.text.addListeners = () ->
console.log('addListeners')