Skip to content

Commit e6adf20

Browse files
authored
Merge pull request microsoft#65222 from irrationalRock/fix59961
Fixed microsoft#59961
2 parents 1cac8b1 + 85d641e commit e6adf20

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/vs/editor/contrib/multicursor/multicursor.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,17 @@ export class MultiCursorSelectionController extends Disposable implements IEdito
603603
matches = this._session.selectAll();
604604
}
605605

606+
if (findState.searchScope) {
607+
const state = findState.searchScope;
608+
let inSelection: FindMatch[] | null = [];
609+
for (let i = 0; i < matches.length; i++) {
610+
if (matches[i].range.endLineNumber <= state.endLineNumber && matches[i].range.startLineNumber >= state.startLineNumber) {
611+
inSelection.push(matches[i]);
612+
}
613+
}
614+
matches = inSelection;
615+
}
616+
606617
if (matches.length > 0) {
607618
const editorSelection = this._editor.getSelection();
608619
// Have the primary cursor remain the one where the action was invoked

0 commit comments

Comments
 (0)