Update decorations synchronously when the wrapping info changes

This commit is contained in:
Alex Dima
2020-11-10 22:00:39 +01:00
parent 63d15a97c7
commit 982bfc2334
@@ -516,9 +516,13 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
if (!editor.getModel()) {
return;
}
if (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.wrappingInfo)) {
if (e.hasChanged(EditorOption.fontInfo)) {
this._updateDecorationsRunner.schedule();
}
if (e.hasChanged(EditorOption.wrappingInfo)) {
this._updateDecorationsRunner.cancel();
this._updateDecorations();
}
}));
this._register(editor.onDidChangeModelContent(() => {
@@ -574,9 +578,13 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
if (!editor.getModel()) {
return;
}
if (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.wrappingInfo)) {
if (e.hasChanged(EditorOption.fontInfo)) {
this._updateDecorationsRunner.schedule();
}
if (e.hasChanged(EditorOption.wrappingInfo)) {
this._updateDecorationsRunner.cancel();
this._updateDecorations();
}
}));
this._register(editor.onDidChangeModelContent(() => {