Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-05-27 05:12:05 +0300
committerPhil Hughes <me@iamphill.com>2016-06-17 13:52:22 +0300
commitad1d55eb9c7cbf70d5a3613259c9738d8e591110 (patch)
tree894dac436e26959e603f1912cb389de673a9a6c0 /app/assets/javascripts/lib
parent3e7770aae17e30c4b6b89d3b1add2fa439ac97ac (diff)
Add redo state
Diffstat (limited to 'app/assets/javascripts/lib')
-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')