File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
src/vs/workbench/contrib/mergeEditor/browser/view/editors Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export class BaseCodeEditorView extends CodeEditorView {
67
67
return [ ] ;
68
68
}
69
69
const model = viewModel . model ;
70
+ const textModel = model . base ;
70
71
71
72
const activeModifiedBaseRange = viewModel . activeModifiedBaseRange . read ( reader ) ;
72
73
const showNonConflictingChanges = viewModel . showNonConflictingChanges . read ( reader ) ;
@@ -98,6 +99,7 @@ export class BaseCodeEditorView extends CodeEditorView {
98
99
options : {
99
100
showIfCollapsed : true ,
100
101
blockClassName : blockClassNames . join ( ' ' ) ,
102
+ blockIsAfterEnd : range . startLineNumber > textModel . getLineCount ( ) ,
101
103
description : 'Merge Editor' ,
102
104
minimap : {
103
105
position : MinimapPosition . Gutter ,
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ export class InputCodeEditorView extends CodeEditorView {
122
122
return [ ] ;
123
123
}
124
124
const model = viewModel . model ;
125
+ const textModel = ( this . inputNumber === 1 ? model . input1 : model . input2 ) . textModel ;
125
126
126
127
const activeModifiedBaseRange = viewModel . activeModifiedBaseRange . read ( reader ) ;
127
128
@@ -158,7 +159,7 @@ export class InputCodeEditorView extends CodeEditorView {
158
159
options : {
159
160
showIfCollapsed : true ,
160
161
blockClassName : blockClassNames . join ( ' ' ) ,
161
- blockIsAfterEnd : range . startLineNumber > this . editor . getModel ( ) ! . getLineCount ( ) ,
162
+ blockIsAfterEnd : range . startLineNumber > textModel . getLineCount ( ) ,
162
163
description : 'Merge Editor' ,
163
164
minimap : {
164
165
position : MinimapPosition . Gutter ,
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ export class ResultCodeEditorView extends CodeEditorView {
113
113
return [ ] ;
114
114
}
115
115
const model = viewModel . model ;
116
+ const textModel = model . resultTextModel ;
116
117
const result = new Array < IModelDeltaDecoration > ( ) ;
117
118
118
119
const baseRangeWithStoreAndTouchingDiffs = join (
@@ -151,11 +152,13 @@ export class ResultCodeEditorView extends CodeEditorView {
151
152
continue ;
152
153
}
153
154
155
+ const range = model . getLineRangeInResult ( modifiedBaseRange . baseRange , reader ) ;
154
156
result . push ( {
155
- range : model . getLineRangeInResult ( modifiedBaseRange . baseRange , reader ) . toInclusiveRangeOrEmpty ( ) ,
157
+ range : range . toInclusiveRangeOrEmpty ( ) ,
156
158
options : {
157
159
showIfCollapsed : true ,
158
160
blockClassName : blockClassNames . join ( ' ' ) ,
161
+ blockIsAfterEnd : range . startLineNumber > textModel . getLineCount ( ) ,
159
162
description : 'Result Diff' ,
160
163
minimap : {
161
164
position : MinimapPosition . Gutter ,
@@ -167,10 +170,8 @@ export class ResultCodeEditorView extends CodeEditorView {
167
170
} : undefined
168
171
}
169
172
} ) ;
170
-
171
173
}
172
174
173
-
174
175
if ( ! modifiedBaseRange || modifiedBaseRange . isConflicting ) {
175
176
for ( const diff of m . rights ) {
176
177
const range = diff . outputRange . toInclusiveRange ( ) ;
You can’t perform that action at this time.
0 commit comments