提交 09061528 编写于 作者: T tamas.kiss

Fixes mousewheel zoom in case of inline diff view

The problem is that the diff viewer does not updates the
font size on the view zones - e.g. deleted lines - when the
editor configuration changes.

Fixes #8778
上级 ab011c39
...@@ -119,7 +119,9 @@ class VisualEditorState { ...@@ -119,7 +119,9 @@ class VisualEditorState {
this._decorations = editor.deltaDecorations(this._decorations, newDecorations.decorations); this._decorations = editor.deltaDecorations(this._decorations, newDecorations.decorations);
// overview ruler // overview ruler
overviewRuler.setZones(newDecorations.overviewZones); if (overviewRuler) {
overviewRuler.setZones(newDecorations.overviewZones);
}
} }
} }
...@@ -202,6 +204,8 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif ...@@ -202,6 +204,8 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
private _editorWorkerService: IEditorWorkerService; private _editorWorkerService: IEditorWorkerService;
private _lastUsedFontInfo:editorCommon.FontInfo;
constructor( constructor(
domElement:HTMLElement, domElement:HTMLElement,
options:editorCommon.IDiffEditorOptions, options:editorCommon.IDiffEditorOptions,
...@@ -760,6 +764,10 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif ...@@ -760,6 +764,10 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
// oh no, you didn't! // oh no, you didn't!
this.modifiedEditor.updateOptions({ wrappingColumn: -1 }); this.modifiedEditor.updateOptions({ wrappingColumn: -1 });
} }
if (this._lastUsedFontInfo !== this.modifiedEditor.getConfiguration().fontInfo) {
this._lastUsedFontInfo = this.modifiedEditor.getConfiguration().fontInfo;
this._onViewZonesChanged();
}
} }
} }
this._recomputeIfNecessary(events); this._recomputeIfNecessary(events);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册