@@ -12,8 +12,8 @@ import { Range } from 'vs/editor/common/core/range';
12
12
import { DateTimeout , ITimeout , InfiniteTimeout , SequenceDiff } from 'vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm' ;
13
13
import { DynamicProgrammingDiffing } from 'vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing' ;
14
14
import { MyersDiffAlgorithm } from 'vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm' ;
15
- import { computeMoves } from 'vs/editor/common/diff/defaultLinesDiffComputer/computeMoves ' ;
16
- import { extendDiffsToEntireWordIfAppropriate , optimizeSequenceDiffs , removeRandomLineMatches , removeRandomMatches , smoothenSequenceDiffs } from 'vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations' ;
15
+ import { computeMovedLines } from 'vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines ' ;
16
+ import { extendDiffsToEntireWordIfAppropriate , optimizeSequenceDiffs , removeVeryShortMatchingLinesBetweenDiffs , removeVeryShortMatchingTextBetweenLongDiffs , removeShortMatches } from 'vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations' ;
17
17
import { ILinesDiffComputer , ILinesDiffComputerOptions , LinesDiff , MovedText } from 'vs/editor/common/diff/linesDiffComputer' ;
18
18
import { DetailedLineRangeMapping , RangeMapping } from '../rangeMapping' ;
19
19
import { LinesSliceCharSequence } from 'vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence' ;
@@ -87,7 +87,7 @@ export class DefaultLinesDiffComputer implements ILinesDiffComputer {
87
87
let lineAlignments = lineAlignmentResult . diffs ;
88
88
let hitTimeout = lineAlignmentResult . hitTimeout ;
89
89
lineAlignments = optimizeSequenceDiffs ( sequence1 , sequence2 , lineAlignments ) ;
90
- lineAlignments = removeRandomLineMatches ( sequence1 , sequence2 , lineAlignments ) ;
90
+ lineAlignments = removeVeryShortMatchingLinesBetweenDiffs ( sequence1 , sequence2 , lineAlignments ) ;
91
91
92
92
const alignments : RangeMapping [ ] = [ ] ;
93
93
@@ -187,7 +187,7 @@ export class DefaultLinesDiffComputer implements ILinesDiffComputer {
187
187
timeout : ITimeout ,
188
188
considerWhitespaceChanges : boolean ,
189
189
) : MovedText [ ] {
190
- const moves = computeMoves (
190
+ const moves = computeMovedLines (
191
191
changes ,
192
192
originalLines ,
193
193
modifiedLines ,
@@ -217,8 +217,8 @@ export class DefaultLinesDiffComputer implements ILinesDiffComputer {
217
217
let diffs = diffResult . diffs ;
218
218
diffs = optimizeSequenceDiffs ( slice1 , slice2 , diffs ) ;
219
219
diffs = extendDiffsToEntireWordIfAppropriate ( slice1 , slice2 , diffs ) ;
220
- diffs = smoothenSequenceDiffs ( slice1 , slice2 , diffs ) ;
221
- diffs = removeRandomMatches ( slice1 , slice2 , diffs ) ;
220
+ diffs = removeShortMatches ( slice1 , slice2 , diffs ) ;
221
+ diffs = removeVeryShortMatchingTextBetweenLongDiffs ( slice1 , slice2 , diffs ) ;
222
222
223
223
const result = diffs . map (
224
224
( d ) =>
0 commit comments