Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading