Skip to content

Commit

Permalink
Adjust line height for decorations on block minimap, fixes #78807
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Macfarlane committed Aug 12, 2019
1 parent 231da46 commit 525f927
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/vs/editor/browser/viewParts/minimap/minimap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,6 @@ export class Minimap extends ViewPart {

canvasContext.clearRect(0, 0, canvasInnerWidth, canvasInnerHeight);

// If the minimap is rendered using blocks, text takes up half the line height
const lineHeightRatio = renderMinimap === RenderMinimap.LargeBlocks || renderMinimap === RenderMinimap.SmallBlocks ? 0.5 : 1;
const height = lineHeight * lineHeightRatio;

// Loop over decorations, ignoring those that don't have the minimap property set and rendering rectangles for each line the decoration spans
const lineOffsetMap = new Map<number, number[]>();
for (let i = 0; i < decorations.length; i++) {
Expand All @@ -756,7 +752,7 @@ export class Minimap extends ViewPart {
}

for (let line = decoration.range.startLineNumber; line <= decoration.range.endLineNumber; line++) {
this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration, layout, line, height, lineHeight, tabSize, characterWidth);
this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration, layout, line, lineHeight, lineHeight, tabSize, characterWidth);
}
}

Expand Down

0 comments on commit 525f927

Please sign in to comment.