diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-05-26 22:12:05 -0400 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-17 11:52:22 +0100 |
commit | ad1d55eb9c7cbf70d5a3613259c9738d8e591110 (patch) | |
tree | 894dac436e26959e603f1912cb389de673a9a6c0 | |
parent | 3e7770aae17e30c4b6b89d3b1add2fa439ac97ac (diff) | |
download | gitlab-ce-ad1d55eb9c7cbf70d5a3613259c9738d8e591110.tar.gz |
Add redo state
-rw-r--r-- | app/assets/javascripts/lib/text_utility.js.coffee | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/text_utility.js.coffee b/app/assets/javascripts/lib/text_utility.js.coffee index 7a115a6d8b5..75e398ddaeb 100644 --- a/app/assets/javascripts/lib/text_utility.js.coffee +++ b/app/assets/javascripts/lib/text_utility.js.coffee @@ -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') |