Skip to content

Commit

Permalink
Improves diff decorations (#186161)
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet authored Jun 26, 2023
1 parent e0529df commit 2e9aae6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ export class DiffEditorDecorations extends Disposable {
continue;
}

originalDecorations.push({ range: i.originalRange, options: (i.originalRange.isEmpty() && showEmptyDecorations) ? diffDeleteDecorationEmpty : diffDeleteDecoration });
modifiedDecorations.push({ range: i.modifiedRange, options: (i.modifiedRange.isEmpty() && showEmptyDecorations) ? diffAddDecorationEmpty : diffAddDecoration });
if (i.originalRange.startLineNumber < m.lineRangeMapping.originalRange.endLineNumberExclusive) {
originalDecorations.push({ range: i.originalRange, options: (i.originalRange.isEmpty() && showEmptyDecorations) ? diffDeleteDecorationEmpty : diffDeleteDecoration });
}
if (i.modifiedRange.startLineNumber < m.lineRangeMapping.modifiedRange.endLineNumberExclusive) {
modifiedDecorations.push({ range: i.modifiedRange, options: (i.modifiedRange.isEmpty() && showEmptyDecorations) ? diffAddDecorationEmpty : diffAddDecoration });
}
}

if (!m.lineRangeMapping.modifiedRange.isEmpty && this._options.shouldRenderRevertArrows.read(reader) && !currentMove) {
Expand Down

0 comments on commit 2e9aae6

Please sign in to comment.