Merge pull request #162167 from microsoft/aiday/issue160271

Making the stash visible by changing the CSS parameters (Fixes #160271)
This commit is contained in:
Aiday Marlen Kyzy 2022-09-28 14:36:11 +02:00 committed by GitHub
commit e59d1e2188
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -29,7 +29,7 @@
.monaco-editor .sticky-widget {
width : 100%;
box-shadow : var(--vscode-scrollbar-shadow) 0 2px 6px -2px;
box-shadow : var(--vscode-scrollbar-shadow) 0 3px 2px -2px;
z-index : 2;
background-color : var(--vscode-editorStickyScroll-background);
}

View file

@ -275,7 +275,7 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
const mouseOverEvent = new StandardMouseEvent(e);
const text = mouseOverEvent.target.innerText;
this._hoverOnLine = line;
// TODO: workaround to find the column index, perhaps need more solid solution
// TODO: workaround to find the column index, perhaps need a more solid solution
this._hoverOnColumn = this._editor.getModel().getLineContent(line).indexOf(text) + 1 || -1;
}
}));
@ -296,8 +296,9 @@ export class StickyScrollWidget extends Disposable implements IOverlayWidget {
const minimapSide = this._editor.getOption(EditorOption.minimap).side;
if (minimapSide === 'left') {
this._rootDomNode.style.marginLeft = this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth + 'px';
} else if (minimapSide === 'right') {
this._rootDomNode.style.marginLeft = '0px';
}
else if (minimapSide === 'right') {
this._rootDomNode.style.marginLeft = '1px';
}
this._rootDomNode.style.zIndex = '11';
}