changed setImmediate with setTimeout

This commit is contained in:
ashu8912 2020-01-26 02:55:07 +05:30
parent 08f1c52f96
commit 5937af22f3
1 changed files with 2 additions and 2 deletions

View File

@ -280,10 +280,10 @@ class Editor extends React.Component {
} else if (mode === 'htmlmixed') {
this._cm.doc.setValue(beautifyHTML(this._cm.doc.getValue(), beautifyOptions));
}
setImmediate(() => {
setTimeout(() => {
this._cm.focus();
this._cm.doc.setCursor({ line: currentPosition.line, ch: currentPosition.ch + INDENTATION_AMOUNT });
});
}, 0);
}
initializeDocuments(files) {