Commit ad1d55eb authored by Jacob Schatz's avatar Jacob Schatz Committed by Phil Hughes

Add redo state

parent 3e7770aa
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
unique = gl.text.undoManager.addUniqueIfNotExists($thisTextarea) unique = gl.text.undoManager.addUniqueIfNotExists($thisTextarea)
if not gl.text.undoManager.undoHistory[unique].length if not gl.text.undoManager.undoHistory[unique].length
return return
latestUndo = gl.text.undoManager.undoHistory[unique].pop()
gl.text.undoManager.history[unique].push(latestUndo)
$thisTextarea.val(latestUndo.newVal)
gl.text.addListeners = () -> gl.text.addListeners = () ->
console.log('addListeners') console.log('addListeners')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment