mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Fixes #208615
This commit is contained in:
parent
1a54634c51
commit
38695f10be
|
@ -84,7 +84,7 @@ export class DiffEditorGutter extends Disposable {
|
|||
const currentDiff = this._currentDiff.read(reader);
|
||||
|
||||
return diffs.mappings.map(m => new DiffGutterItem(
|
||||
m.lineRangeMapping,
|
||||
m.lineRangeMapping.withInnerChangesFromLineRanges(),
|
||||
m.lineRangeMapping === currentDiff?.lineRangeMapping,
|
||||
MenuId.DiffEditorHunkToolbar,
|
||||
undefined,
|
||||
|
|
|
@ -118,6 +118,12 @@ export class DetailedLineRangeMapping extends LineRangeMapping {
|
|||
public override flip(): DetailedLineRangeMapping {
|
||||
return new DetailedLineRangeMapping(this.modified, this.original, this.innerChanges?.map(c => c.flip()));
|
||||
}
|
||||
|
||||
public withInnerChangesFromLineRanges(): DetailedLineRangeMapping {
|
||||
return new DetailedLineRangeMapping(this.original, this.modified, [
|
||||
new RangeMapping(this.original.toExclusiveRange(), this.modified.toExclusiveRange()),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue