Skip to content
Open
Changes from all 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
14 changes: 10 additions & 4 deletions src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ class DiffEditorHelperContribution extends Disposable implements IDiffEditorCont
localize('hintWhitespace', "Show Whitespace Differences"),
null
));
store.add(helperWidget.onClick(() => {
this._textResourceConfigurationService.updateValue(this._diffEditor.getModel()!.modified.uri, 'diffEditor.ignoreTrimWhitespace', false);
}));
store.add(helperWidget.onClick(() => {
const model = this._diffEditor.getModel();
if (model) {
this._textResourceConfigurationService.updateValue(model.modified.uri, 'diffEditor.ignoreTrimWhitespace', false);
}
}));
Comment on lines +48 to +53
helperWidget.render();
}
}));
Expand All @@ -62,7 +65,10 @@ class DiffEditorHelperContribution extends Disposable implements IDiffEditorCont
[{
label: localize('removeTimeout', "Remove Limit"),
run: () => {
this._textResourceConfigurationService.updateValue(this._diffEditor.getModel()!.modified.uri, 'diffEditor.maxComputationTime', 0);
const model = this._diffEditor.getModel();
if (model) {
this._textResourceConfigurationService.updateValue(model.modified.uri, 'diffEditor.maxComputationTime', 0);
}
Comment on lines +68 to +71
}
}],
{}
Expand Down