mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-29 00:46:00 +01:00
Fix mouse target around margin when having the minimap to the left
This commit is contained in:
@@ -364,7 +364,7 @@ abstract class BareHitTestRequest {
|
||||
|
||||
this.mouseVerticalOffset = Math.max(0, ctx.getCurrentScrollTop() + pos.y - editorPos.y);
|
||||
this.mouseContentHorizontalOffset = ctx.getCurrentScrollLeft() + pos.x - editorPos.x - ctx.layoutInfo.contentLeft;
|
||||
this.isInMarginArea = (pos.x - editorPos.x < ctx.layoutInfo.contentLeft);
|
||||
this.isInMarginArea = (pos.x - editorPos.x < ctx.layoutInfo.contentLeft && pos.x - editorPos.x >= ctx.layoutInfo.glyphMarginLeft);
|
||||
this.isInContentArea = !this.isInMarginArea;
|
||||
this.mouseColumn = Math.max(0, MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset, ctx.typicalHalfwidthCharacterWidth));
|
||||
}
|
||||
@@ -587,6 +587,8 @@ export class MouseTargetFactory {
|
||||
offsetX: offset
|
||||
};
|
||||
|
||||
offset -= ctx.layoutInfo.glyphMarginLeft;
|
||||
|
||||
if (offset <= ctx.layoutInfo.glyphMarginWidth) {
|
||||
// On the glyph margin
|
||||
return request.fulfill(MouseTargetType.GUTTER_GLYPH_MARGIN, pos, res.range, detail);
|
||||
|
||||
Reference in New Issue
Block a user