summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-05-26 22:12:05 -0400
committerPhil Hughes <me@iamphill.com>2016-06-17 11:52:22 +0100
commitad1d55eb9c7cbf70d5a3613259c9738d8e591110 (patch)
tree894dac436e26959e603f1912cb389de673a9a6c0
parent3e7770aae17e30c4b6b89d3b1add2fa439ac97ac (diff)
downloadgitlab-ce-ad1d55eb9c7cbf70d5a3613259c9738d8e591110.tar.gz
Add redo state
-rw-r--r--app/assets/javascripts/lib/text_utility.js.coffee3
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')