4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
6
import { RunOnceScheduler } from 'vs/base/common/async' ;
7
+ import { CancellationTokenSource } from 'vs/base/common/cancellation' ;
7
8
import { Disposable , toDisposable } from 'vs/base/common/lifecycle' ;
8
9
import { IObservable , IReader , ISettableObservable , ITransaction , autorunWithStore , derived , observableSignal , observableSignalFromEvent , observableValue , transaction , waitForState } from 'vs/base/common/observable' ;
9
- import { isDefined } from 'vs/base/common/types ' ;
10
+ import { readHotReloadableExport } from 'vs/editor/browser/widget/diffEditorWidget2/utils ' ;
10
11
import { ISerializedLineRange , LineRange } from 'vs/editor/common/core/lineRange' ;
11
12
import { Range } from 'vs/editor/common/core/range' ;
12
- import { IDocumentDiff , IDocumentDiffProvider } from 'vs/editor/common/diff/documentDiffProvider' ;
13
- import { LineRangeMapping , MovedText , RangeMapping , SimpleLineRangeMapping } from 'vs/editor/common/diff/linesDiffComputer' ;
14
13
import { AdvancedLinesDiffComputer , lineRangeMappingFromRangeMappings } from 'vs/editor/common/diff/advancedLinesDiffComputer' ;
14
+ import { IDocumentDiff , IDocumentDiffProvider } from 'vs/editor/common/diff/documentDiffProvider' ;
15
+ import { LineRangeMapping , MovedText , RangeMapping } from 'vs/editor/common/diff/linesDiffComputer' ;
15
16
import { IDiffEditorModel , IDiffEditorViewModel } from 'vs/editor/common/editorCommon' ;
16
17
import { ITextModel } from 'vs/editor/common/model' ;
17
18
import { TextEditInfo } from 'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper' ;
18
19
import { combineTextEditInfos } from 'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos' ;
19
20
import { lengthAdd , lengthDiffNonNegative , lengthGetLineCount , lengthOfRange , lengthToPosition , lengthZero , positionToLength } from 'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length' ;
20
21
import { DiffEditorOptions } from './diffEditorOptions' ;
21
- import { readHotReloadableExport } from 'vs/editor/browser/widget/diffEditorWidget2/utils' ;
22
- import { CancellationTokenSource } from 'vs/base/common/cancellation' ;
23
22
24
23
export class DiffEditorViewModel extends Disposable implements IDiffEditorViewModel {
25
24
private readonly _isDiffUpToDate = observableValue < boolean > ( 'isDiffUpToDate' , false ) ;
@@ -469,6 +468,9 @@ export class UnchangedRegion {
469
468
}
470
469
471
470
function applyOriginalEdits ( diff : IDocumentDiff , textEdits : TextEditInfo [ ] , originalTextModel : ITextModel , modifiedTextModel : ITextModel ) : IDocumentDiff | undefined {
471
+ return undefined ;
472
+ /*
473
+ TODO@hediet
472
474
if (textEdits.length === 0) {
473
475
return diff;
474
476
}
@@ -478,7 +480,7 @@ function applyOriginalEdits(diff: IDocumentDiff, textEdits: TextEditInfo[], orig
478
480
if (!diff3) {
479
481
return undefined;
480
482
}
481
- return flip ( diff3 ) ;
483
+ return flip(diff3);*/
482
484
}
483
485
484
486
function flip ( diff : IDocumentDiff ) : IDocumentDiff {
@@ -491,6 +493,9 @@ function flip(diff: IDocumentDiff): IDocumentDiff {
491
493
}
492
494
493
495
function applyModifiedEdits ( diff : IDocumentDiff , textEdits : TextEditInfo [ ] , originalTextModel : ITextModel , modifiedTextModel : ITextModel ) : IDocumentDiff | undefined {
496
+ return undefined ;
497
+ /*
498
+ TODO@hediet
494
499
if (textEdits.length === 0) {
495
500
return diff;
496
501
}
@@ -514,7 +519,7 @@ function applyModifiedEdits(diff: IDocumentDiff, textEdits: TextEditInfo[], orig
514
519
quitEarly: false,
515
520
changes,
516
521
moves,
517
- } ;
522
+ };*/
518
523
}
519
524
520
525
function applyEditToLineRange ( range : LineRange , textEdits : TextEditInfo [ ] ) : LineRange | undefined {
0 commit comments