File tree Expand file tree Collapse file tree
workbench/parts/scm/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export interface IViewZoneData {
2828
2929export interface IMarginData {
3030 isAfterLines : boolean ;
31+ glyphMarginLeft : number ;
3132 glyphMarginWidth : number ;
3233 lineNumbersWidth : number ;
3334 offsetX : number ;
@@ -602,6 +603,7 @@ export class MouseTargetFactory {
602603 let offset = Math . abs ( request . pos . x - request . editorPos . x ) ;
603604 const detail : IMarginData = {
604605 isAfterLines : res . isAfterLines ,
606+ glyphMarginLeft : ctx . layoutInfo . glyphMarginLeft ,
605607 glyphMarginWidth : ctx . layoutInfo . glyphMarginWidth ,
606608 lineNumbersWidth : ctx . layoutInfo . lineNumbersWidth ,
607609 offsetX : offset
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ export class FoldingController implements IEditorContribution {
298298 switch ( e . target . type ) {
299299 case MouseTargetType . GUTTER_LINE_DECORATIONS :
300300 const data = e . target . detail as IMarginData ;
301- const gutterOffsetX = data . offsetX - data . glyphMarginWidth - data . lineNumbersWidth ;
301+ const gutterOffsetX = data . offsetX - data . glyphMarginWidth - data . lineNumbersWidth - data . glyphMarginLeft ;
302302
303303 // TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff
304304 if ( gutterOffsetX <= 10 ) {
Original file line number Diff line number Diff line change @@ -705,7 +705,7 @@ export class DirtyDiffController implements IEditorContribution {
705705 }
706706
707707 const data = e . target . detail as IMarginData ;
708- const gutterOffsetX = data . offsetX - data . glyphMarginWidth - data . lineNumbersWidth ;
708+ const gutterOffsetX = data . offsetX - data . glyphMarginWidth - data . lineNumbersWidth - data . glyphMarginLeft ;
709709
710710 // TODO@joao TODO@alex TODO@martin this is such that we don't collide with folding
711711 if ( gutterOffsetX > 10 ) {
You can’t perform that action at this time.
0 commit comments