Skip to content

Commit

Permalink
Revert now-unnecessary change
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Grant <[email protected]>
  • Loading branch information
colin-grant-work committed Nov 24, 2021
1 parent 790bb87 commit a9196a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/browser/preferences/preference-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ export abstract class PreferenceProvider implements Disposable {
this.deferredChanges = undefined;
if (changes && Object.keys(changes).length) {
this.onDidPreferencesChangedEmitter.fire(changes);
return true;
}
return true;
return false;
}, 0);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,9 @@ export abstract class AbstractResourcePreferenceProvider extends PreferenceProvi
this.toDispose.push(reference);
this.toDispose.push(Disposable.create(() => this.model = undefined));

this.toDispose.push(this.model.onDidChangeContent(() => (
console.log('READING BECAUSE...CONTENT', this.transactionLock.isLocked()), !this.transactionLock.isLocked() && this.readPreferences()))
);
this.toDispose.push(this.model.onDirtyChanged(() => (
console.log('READING BECAUSE...DIRTY', this.transactionLock.isLocked()), !this.transactionLock.isLocked() && this.readPreferences()))
);
this.toDispose.push(this.model.onDidChangeValid(() => (console.log('READING BECAUSE...VALID'), this.readPreferences())));
this.toDispose.push(this.model.onDidChangeContent(() => !this.transactionLock.isLocked() && this.readPreferences()));
this.toDispose.push(this.model.onDirtyChanged(() => !this.transactionLock.isLocked() && this.readPreferences()));
this.toDispose.push(this.model.onDidChangeValid(() => this.readPreferences()));

this.toDispose.push(Disposable.create(() => this.reset()));
}
Expand Down Expand Up @@ -210,7 +206,7 @@ export abstract class AbstractResourcePreferenceProvider extends PreferenceProvi
locks?.releaseChange();
}

private getEditOperations(path: string[], value: any): monaco.editor.IIdentifiedSingleEditOperation[] {
protected getEditOperations(path: string[], value: any): monaco.editor.IIdentifiedSingleEditOperation[] {
const textModel = this.model!.textEditorModel;
const content = this.model!.getText().trim();
// Everything is already undefined - no need for changes.
Expand Down

0 comments on commit a9196a1

Please sign in to comment.