Commit 751f109f authored by Alex Beregszaszi's avatar Alex Beregszaszi

Save file contents periodically

And don't rely on the auto-compile feature to do so.
parent ec1ab032
......@@ -455,10 +455,13 @@ var run = function () {
function editorOnChange () {
var input = editor.getValue()
// save contents
editor.setCacheFileContent(input)
if (input === '') {
editor.setCacheFileContent('')
return
}
if (input === previousInput) {
return
}
......
......@@ -41,7 +41,6 @@ function Compiler (editor, handleGithubCall) {
editor.clearAnnotations()
self.event.trigger('compilationStarted', [])
var input = editor.getValue()
editor.setCacheFileContent(input)
var files = {}
files[utils.fileNameFromKey(editor.getCacheFile())] = input
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment