mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Adjust line height for decorations on block minimap, fixes #78807
This commit is contained in:
parent
231da466d5
commit
525f927adc
|
@ -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++) {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue