diff --git a/src/vs/workbench/contrib/membrane/browser/membraneEditorDecorations.contribution.ts b/src/vs/workbench/contrib/membrane/browser/membraneEditorDecorations.contribution.ts index 59288b16581ec..a05b5035826cf 100644 --- a/src/vs/workbench/contrib/membrane/browser/membraneEditorDecorations.contribution.ts +++ b/src/vs/workbench/contrib/membrane/browser/membraneEditorDecorations.contribution.ts @@ -144,9 +144,6 @@ export class MembraneEditorDecorationsContribution extends Disposable implements private _createViewZoneNode(zone: IMembraneViewZone, fontInfo: { fontFamily: string; fontSize: number; lineHeight: number }): HTMLElement { const container = document.createElement('div'); - console.log('[membrane] fontInfo:', fontInfo.fontFamily, fontInfo.fontSize, fontInfo.lineHeight); - - if (zone.styled) { // Styled view zone (e.g., deleted lines in diff) container.style.cssText = ` diff --git a/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts b/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts index 9af4b8a735bf7..baa1090529964 100644 --- a/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts +++ b/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts @@ -68,13 +68,21 @@ export class MembraneEditorMetricsContribution extends Disposable implements IWo const startLine = Math.max(1, firstVisibleLine - 20); const endLine = Math.min(lineCount, lastVisibleLine + 20); + const isLineVisible = (line: number): boolean => { + return visibleRanges.some(range => + line >= range.startLineNumber && line <= range.endLineNumber + ); + }; + const linePositions: Array<{ line: number; top: number; bottom: number }> = []; for (let line = startLine; line <= endLine; line++) { - linePositions.push({ - line, - top: editor.getTopForLineNumber(line, true), - bottom: editor.getBottomForLineNumber(line), - }); + if (isLineVisible(line)) { + linePositions.push({ + line, + top: editor.getTopForLineNumber(line, true), + bottom: editor.getBottomForLineNumber(line), + }); + } } return {