don't restore view state as we have trustworthy edits

This commit is contained in:
Johannes Rieken 2016-08-09 09:43:33 +02:00
parent f4c18ebb73
commit 6a678c40e0

View file

@ -198,17 +198,8 @@ export class FormatAction extends EditorAction {
}
public apply(editor: editorCommon.ICommonCodeEditor, editorSelection: Selection, value: editorCommon.ISingleEditOperation[]): void {
var state: editorCommon.IEditorViewState = null;
if (editorSelection.isEmpty()) {
state = editor.saveViewState();
}
var command = new EditOperationsCommand(value, editorSelection);
const command = new EditOperationsCommand(value, editorSelection);
editor.executeCommand(this.id, command);
if (state) {
editor.restoreViewState(state);
}
}
}