Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/modules/IDE/components/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,11 @@ class Editor extends React.Component {
plugins
}
);
const { left, top } = this._cm.getScrollInfo();
this._cm.doc.setValue(formatted);
this._cm.focus();
this._cm.doc.setCursor(this._cm.doc.posFromIndex(cursorOffset));
this._cm.scrollTo(left, top);
} catch (error) {
console.error(error);
}
Expand Down