Skip to content

Commit

Permalink
delay history creation
Browse files Browse the repository at this point in the history
  • Loading branch information
David Annopolsky committed Oct 31, 2015
1 parent 90f017d commit b5add84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/js/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ var compile = function compile() {
filename: 'ramtuary'
});

evalElement.textContent = evalSource(transformed.code).replace('"use strict"', '');
evalElement.textContent = evalSource(transformed.code);
} catch (err) {
printError(err.message);
throw err;
Expand All @@ -326,7 +326,7 @@ _logger2.default.main();
(0, _examples2.default)();
(0, _googl2.default)();

var debounceCompile = (0, _debounce2.default)(compile, 500);
var debounceCompile = (0, _debounce2.default)(compile, 1000);

var input = CodeMirror.fromTextArea(document.querySelector('.input'), {
lineNumbers: true,
Expand All @@ -336,6 +336,7 @@ var input = CodeMirror.fromTextArea(document.querySelector('.input'), {
},
autofocus: true,
autoCloseBrackets: true,
historyEventDelay: 2000,
mode: {
name: "javascript",
json: true,
Expand Down
5 changes: 3 additions & 2 deletions lib/js/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const compile = function compile() {
filename: 'ramtuary'
});

evalElement.textContent = evalSource(transformed.code).replace('"use strict"', '');
evalElement.textContent = evalSource(transformed.code);
} catch (err) {
printError(err.message);
throw err;
Expand All @@ -55,7 +55,7 @@ reporter.main();
examples();
googl();

const debounceCompile = debounce(compile, 500);
const debounceCompile = debounce(compile, 1000);

const input = CodeMirror.fromTextArea(document.querySelector('.input'), {
lineNumbers: true,
Expand All @@ -65,6 +65,7 @@ const input = CodeMirror.fromTextArea(document.querySelector('.input'), {
},
autofocus: true,
autoCloseBrackets: true,
historyEventDelay: 2000,
mode: {
name: "javascript",
json: true,
Expand Down

0 comments on commit b5add84

Please sign in to comment.