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