From 6434cc1bdf9900cb3efe7920429a2deffc12e0fb 2014-11-28 10:33:46 From: Matthias Bussonnier Date: 2014-11-28 10:33:46 Subject: [PATCH] Merge pull request #7046 from quantopian/fix-history-undo-load BUG: Prevent users from undoing the initial document load with CTRL-Z. --- diff --git a/IPython/html/static/edit/js/editor.js b/IPython/html/static/edit/js/editor.js index 48e2e88..f2db0c8 100644 --- a/IPython/html/static/edit/js/editor.js +++ b/IPython/html/static/edit/js/editor.js @@ -35,7 +35,11 @@ function($, this.contents.get(this.file_path, {type: 'file', format: 'text'}) .then(function(model) { cm.setValue(model.content); - + + // Setting the file's initial value creates a history entry, + // which we don't want. + cm.clearHistory(); + // Find and load the highlighting mode var modeinfo = CodeMirror.findModeByMIME(model.mimetype); if (modeinfo) {