Skip to content

Commit

Permalink
Merge pull request #44006 from aushakou/fix-43465
Browse files Browse the repository at this point in the history
Fix #43465
  • Loading branch information
alexdima authored Mar 7, 2018
2 parents a5195ab + bbd507f commit b166331
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ class Settings {
this.themeType = theme.type;

const minimapEnabled = config.editor.viewInfo.minimap.enabled;
const minimapSide = config.editor.viewInfo.minimap.side;
const backgroundColor = (minimapEnabled ? TokenizationRegistry.getDefaultBackground() : null);
this.backgroundColor = (backgroundColor ? Color.Format.CSS.formatHex(backgroundColor) : null);
if (backgroundColor === null || minimapSide === 'left') {
this.backgroundColor = null;
} else {
this.backgroundColor = Color.Format.CSS.formatHex(backgroundColor);
}

const position = config.editor.layoutInfo.overviewRuler;
this.top = position.top;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ export class ScrollDecorationViewPart extends ViewPart {

private _updateWidth(): boolean {
const layoutInfo = this._context.configuration.editor.layoutInfo;
let newWidth = layoutInfo.width - layoutInfo.minimapWidth;
let newWidth = 0;
if (layoutInfo.renderMinimap === 0 || (layoutInfo.minimapWidth > 0 && layoutInfo.minimapLeft === 0)) {
newWidth = layoutInfo.width;
} else {
newWidth = layoutInfo.width - layoutInfo.minimapWidth - layoutInfo.verticalScrollbarWidth;
}
if (this._width !== newWidth) {
this._width = newWidth;
return true;
Expand Down

0 comments on commit b166331

Please sign in to comment.