File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/vs/workbench/contrib/interactiveEditor/browser Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -267,14 +267,12 @@ export class InteractiveEditorController implements IEditorContribution {
267
267
}
268
268
269
269
const wholeRange = this . _activeSession ! . wholeRange ;
270
- let editIsOutsideOfWholeRange = false ;
271
- for ( const { range } of e . changes ) {
272
- editIsOutsideOfWholeRange = ! Range . areIntersectingOrTouching ( range , wholeRange ) ;
273
- }
270
+ const someSelectionInsideOfWholeRange = this . _editor . getSelections ( ) !
271
+ . some ( sel => Range . areIntersectingOrTouching ( sel , wholeRange ) ) ;
274
272
275
- this . _activeSession ! . recordExternalEditOccurred ( editIsOutsideOfWholeRange ) ;
273
+ this . _activeSession ! . recordExternalEditOccurred ( someSelectionInsideOfWholeRange ) ;
276
274
277
- if ( editIsOutsideOfWholeRange ) {
275
+ if ( ! someSelectionInsideOfWholeRange ) {
278
276
this . _logService . trace ( '[IE] text changed outside of whole range, FINISH session' ) ;
279
277
this . _finishExistingSession ( ) ;
280
278
}
You can’t perform that action at this time.
0 commit comments