mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Merge pull request #7046 from quantopian/fix-history-undo-load
BUG: Prevent users from undoing the initial document load with CTRL-Z.
This commit is contained in:
commit
d8a90257de
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user