File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
src/vs/workbench/contrib/mergeEditor/browser Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,10 @@ export class MergeEditorModel extends EditorModel {
334
334
return ModifiedBaseRangeState . conflicting ;
335
335
}
336
336
337
+ public has ( baseRange : ModifiedBaseRange ) : boolean {
338
+ return this . modifiedBaseRangeHandlingStateStores . get ( ) . has ( baseRange ) ;
339
+ }
340
+
337
341
public isHandled ( baseRange : ModifiedBaseRange ) : IObservable < boolean > {
338
342
return this . modifiedBaseRangeHandlingStateStores . get ( ) . get ( baseRange ) ! ;
339
343
}
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ export class ModifiedBaseRange {
48
48
public readonly input1CombinedDiff = DetailedLineRangeMapping . join ( this . input1Diffs ) ;
49
49
public readonly input2CombinedDiff = DetailedLineRangeMapping . join ( this . input2Diffs ) ;
50
50
51
-
52
51
constructor (
53
52
public readonly baseRange : LineRange ,
54
53
public readonly baseTextModel : ITextModel ,
Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ export class InputCodeEditorView extends CodeEditorView {
131
131
className : derived ( 'checkbox classnames' , ( reader ) => {
132
132
const classNames = [ ] ;
133
133
const active = viewModel . activeModifiedBaseRange . read ( reader ) ;
134
+ if ( ! model . has ( baseRange ) ) {
135
+ return '' ; // Invalid state, should only be observed temporarily
136
+ }
134
137
const isHandled = model . isHandled ( baseRange ) . read ( reader ) ;
135
138
if ( isHandled ) {
136
139
classNames . push ( 'handled' ) ;
You can’t perform that action at this time.
0 commit comments