File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
src/vs/workbench/contrib/mergeEditor/browser/model Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -162,15 +162,17 @@ export class DocumentMapping {
162
162
if ( lastBefore . getRange ( containingDirection ) . contains ( lineNumber ) ) {
163
163
return lastBefore ;
164
164
}
165
- return new LineRangeMapping (
166
- new LineRange ( lineNumber , 1 ) ,
167
- new LineRange (
168
- lineNumber +
169
- lastBefore . getRange ( mapTo ) . endLineNumberExclusive -
170
- lastBefore . getRange ( containingDirection ) . endLineNumberExclusive ,
171
- 1
172
- )
165
+ const containingRange = new LineRange ( lineNumber , 1 ) ;
166
+ const mappedRange = new LineRange (
167
+ lineNumber +
168
+ lastBefore . getRange ( mapTo ) . endLineNumberExclusive -
169
+ lastBefore . getRange ( containingDirection ) . endLineNumberExclusive ,
170
+ 1
173
171
) ;
172
+
173
+ return containingDirection === MappingDirection . input
174
+ ? new LineRangeMapping ( containingRange , mappedRange )
175
+ : new LineRangeMapping ( mappedRange , containingRange ) ;
174
176
}
175
177
return new LineRangeMapping (
176
178
new LineRange ( lineNumber , 1 ) ,
You can’t perform that action at this time.
0 commit comments