File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class WorkerBasedDocumentDiffProvider implements IDocumentDiffProvider {
22
22
}
23
23
24
24
// Convert from space efficient JSON data to rich objects.
25
- return {
25
+ const diff : IDocumentDiff = {
26
26
identical : result . identical ,
27
27
quitEarly : result . quitEarly ,
28
28
changes : result . changes . map (
@@ -40,5 +40,6 @@ export class WorkerBasedDocumentDiffProvider implements IDocumentDiffProvider {
40
40
)
41
41
) ,
42
42
} ;
43
+ return diff ;
43
44
}
44
45
}
Original file line number Diff line number Diff line change @@ -106,14 +106,14 @@ class FastInt32Array {
106
106
set ( idx : number , value : number ) : void {
107
107
if ( idx < 0 ) {
108
108
idx = - idx - 1 ;
109
- if ( idx > this . negativeArr . length ) {
109
+ if ( idx >= this . negativeArr . length ) {
110
110
const arr = this . negativeArr ;
111
111
this . negativeArr = new Int32Array ( arr . length * 2 ) ;
112
112
this . negativeArr . set ( arr ) ;
113
113
}
114
114
this . negativeArr [ idx ] = value ;
115
115
} else {
116
- if ( idx > this . positiveArr . length ) {
116
+ if ( idx >= this . positiveArr . length ) {
117
117
const arr = this . positiveArr ;
118
118
this . positiveArr = new Int32Array ( arr . length * 2 ) ;
119
119
this . positiveArr . set ( arr ) ;
Original file line number Diff line number Diff line change @@ -80,13 +80,14 @@ export class StandardLinesDiffComputer implements ILinesDiffComputer {
80
80
const targetSlice = new Slice ( modifiedLines , diff . seq2Range ) ;
81
81
82
82
const diffs = this . detailedDiffingAlgorithm . compute ( sourceSlice , targetSlice ) ;
83
- return diffs . map (
83
+ const result = diffs . map (
84
84
( d ) =>
85
85
new RangeMapping (
86
86
sourceSlice . translateRange ( d . seq1Range ) . delta ( diff . seq1Range . start ) ,
87
87
targetSlice . translateRange ( d . seq2Range ) . delta ( diff . seq2Range . start )
88
88
)
89
89
) ;
90
+ return result ;
90
91
}
91
92
}
92
93
You can’t perform that action at this time.
0 commit comments