From c9bcf01e1ce541311981a2bac20de901165adc36 Mon Sep 17 00:00:00 2001 From: Thomas Seeley Date: Mon, 26 Jan 2026 10:59:40 -0500 Subject: [PATCH 1/2] line positions only for visible lines, remove logs --- .../membraneEditorDecorations.contribution.ts | 3 --- .../membraneEditorMetrics.contribution.ts | 20 ++++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) 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..ef357bc54b4b8 100644 --- a/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts +++ b/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts @@ -68,13 +68,23 @@ export class MembraneEditorMetricsContribution extends Disposable implements IWo const startLine = Math.max(1, firstVisibleLine - 20); const endLine = Math.min(lineCount, lastVisibleLine + 20); + // Helper to check if a line is actually visible (not in a fold) + 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), - }); + // Only include lines that are actually visible (not in folds) + if (isLineVisible(line)) { + linePositions.push({ + line, + top: editor.getTopForLineNumber(line, true), + bottom: editor.getBottomForLineNumber(line), + }); + } } return { From 1693bae95ed9855dc7a8409eab5b137538cc0344 Mon Sep 17 00:00:00 2001 From: Thomas Seeley Date: Mon, 26 Jan 2026 11:02:23 -0500 Subject: [PATCH 2/2] remove comments --- .../membrane/browser/membraneEditorMetrics.contribution.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts b/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts index ef357bc54b4b8..baa1090529964 100644 --- a/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts +++ b/src/vs/workbench/contrib/membrane/browser/membraneEditorMetrics.contribution.ts @@ -68,7 +68,6 @@ export class MembraneEditorMetricsContribution extends Disposable implements IWo const startLine = Math.max(1, firstVisibleLine - 20); const endLine = Math.min(lineCount, lastVisibleLine + 20); - // Helper to check if a line is actually visible (not in a fold) const isLineVisible = (line: number): boolean => { return visibleRanges.some(range => line >= range.startLineNumber && line <= range.endLineNumber @@ -77,7 +76,6 @@ export class MembraneEditorMetricsContribution extends Disposable implements IWo const linePositions: Array<{ line: number; top: number; bottom: number }> = []; for (let line = startLine; line <= endLine; line++) { - // Only include lines that are actually visible (not in folds) if (isLineVisible(line)) { linePositions.push({ line,