From 35d1b861f080c4662ff136bd952cd8e19ff44fd4 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Mon, 8 Feb 2016 21:46:03 +1000 Subject: [PATCH] Make undo buffer cull the right end --- src/js/HuesEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/HuesEditor.js b/src/js/HuesEditor.js index 30bd479..5115313 100644 --- a/src/js/HuesEditor.js +++ b/src/js/HuesEditor.js @@ -380,7 +380,7 @@ HuesEditor.prototype.pushUndo = function(name, editor, oldText, newText) { this.undoBuffer.push({songVar: name, editor: editor, text: oldText}); while(this.undoBuffer.length > 50) { - this.undoBuffer.pop(); + this.undoBuffer.shift(); } this.updateUndoUI(); };