Skip to content
Merged
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
8 changes: 6 additions & 2 deletions src/vs/code/browser/workbench/workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ type Writeable<T> = { -readonly [P in keyof T]: T[P] };
const domElement = window.vscodeTargetContainer || document.body;
create(domElement, config);

// NOTE: Registering these commands here ...
CommandsRegistry.registerCommand(
'membrane.setViewZones',
async (
Expand All @@ -170,6 +169,7 @@ type Writeable<T> = { -readonly [P in keyof T]: T[P] };
afterLineNumber: number;
heightInPx: number;
lines: string[];
styled?: boolean;
}>;
},
) => {
Expand Down Expand Up @@ -206,7 +206,9 @@ type Writeable<T> = { -readonly [P in keyof T]: T[P] };
// Add all new zones
const newZoneIds: string[] = [];
for (const zone of args.zones) {
const container = document.createElement('div');
const container = document.createElement('div');

if (zone.styled) {
container.style.cssText = `
position: relative;
background: rgba(255, 0, 0, 0.15);
Expand All @@ -230,6 +232,7 @@ type Writeable<T> = { -readonly [P in keyof T]: T[P] };
lineDiv.textContent = line;
container.appendChild(lineDiv);
});
}

const zoneId = accessor.addZone({
afterLineNumber: zone.afterLineNumber,
Expand Down Expand Up @@ -260,6 +263,7 @@ type Writeable<T> = { -readonly [P in keyof T]: T[P] };
scrollTop: activeControl.getScrollTop(),
firstLineTop: activeControl.getTopForLineNumber(firstVisibleLine),
firstVisibleLine: firstVisibleLine,
contentLeft: activeControl.getLayoutInfo().contentLeft,
};
},
);
Expand Down
Loading