mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-28 16:39:00 +01:00
Fixes #44940
This commit is contained in:
@@ -28,6 +28,7 @@ export interface IViewZoneData {
|
||||
|
||||
export interface IMarginData {
|
||||
isAfterLines: boolean;
|
||||
glyphMarginLeft: number;
|
||||
glyphMarginWidth: number;
|
||||
lineNumbersWidth: number;
|
||||
offsetX: number;
|
||||
@@ -602,6 +603,7 @@ export class MouseTargetFactory {
|
||||
let offset = Math.abs(request.pos.x - request.editorPos.x);
|
||||
const detail: IMarginData = {
|
||||
isAfterLines: res.isAfterLines,
|
||||
glyphMarginLeft: ctx.layoutInfo.glyphMarginLeft,
|
||||
glyphMarginWidth: ctx.layoutInfo.glyphMarginWidth,
|
||||
lineNumbersWidth: ctx.layoutInfo.lineNumbersWidth,
|
||||
offsetX: offset
|
||||
|
||||
@@ -298,7 +298,7 @@ export class FoldingController implements IEditorContribution {
|
||||
switch (e.target.type) {
|
||||
case MouseTargetType.GUTTER_LINE_DECORATIONS:
|
||||
const data = e.target.detail as IMarginData;
|
||||
const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth;
|
||||
const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft;
|
||||
|
||||
// TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff
|
||||
if (gutterOffsetX <= 10) {
|
||||
|
||||
@@ -705,7 +705,7 @@ export class DirtyDiffController implements IEditorContribution {
|
||||
}
|
||||
|
||||
const data = e.target.detail as IMarginData;
|
||||
const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth;
|
||||
const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft;
|
||||
|
||||
// TODO@joao TODO@alex TODO@martin this is such that we don't collide with folding
|
||||
if (gutterOffsetX > 10) {
|
||||
|
||||
Reference in New Issue
Block a user