don't restore view state as we have trustworthy edits
This commit is contained in:
parent
f4c18ebb73
commit
6a678c40e0
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue