mirror of
https://github.com/Microsoft/vscode
synced 2024-11-05 18:29:38 +00:00
Fixes edge case (#158888)
This commit is contained in:
parent
d5a59298e2
commit
9628fab4f8
3 changed files with 7 additions and 1 deletions
|
@ -334,6 +334,10 @@ export class MergeEditorModel extends EditorModel {
|
|||
return ModifiedBaseRangeState.conflicting;
|
||||
}
|
||||
|
||||
public has(baseRange: ModifiedBaseRange): boolean {
|
||||
return this.modifiedBaseRangeHandlingStateStores.get().has(baseRange);
|
||||
}
|
||||
|
||||
public isHandled(baseRange: ModifiedBaseRange): IObservable<boolean> {
|
||||
return this.modifiedBaseRangeHandlingStateStores.get().get(baseRange)!;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ export class ModifiedBaseRange {
|
|||
public readonly input1CombinedDiff = DetailedLineRangeMapping.join(this.input1Diffs);
|
||||
public readonly input2CombinedDiff = DetailedLineRangeMapping.join(this.input2Diffs);
|
||||
|
||||
|
||||
constructor(
|
||||
public readonly baseRange: LineRange,
|
||||
public readonly baseTextModel: ITextModel,
|
||||
|
|
|
@ -131,6 +131,9 @@ export class InputCodeEditorView extends CodeEditorView {
|
|||
className: derived('checkbox classnames', (reader) => {
|
||||
const classNames = [];
|
||||
const active = viewModel.activeModifiedBaseRange.read(reader);
|
||||
if (!model.has(baseRange)) {
|
||||
return ''; // Invalid state, should only be observed temporarily
|
||||
}
|
||||
const isHandled = model.isHandled(baseRange).read(reader);
|
||||
if (isHandled) {
|
||||
classNames.push('handled');
|
||||
|
|
Loading…
Reference in a new issue