diff --git a/src/vs/editor/contrib/find/findController.ts b/src/vs/editor/contrib/find/findController.ts index e2d7aa8248b..f82c32e9e1b 100644 --- a/src/vs/editor/contrib/find/findController.ts +++ b/src/vs/editor/contrib/find/findController.ts @@ -38,7 +38,10 @@ export function getSelectionSearchString(editor: ICodeEditor, seedSearchStringFr const selection = editor.getSelection(); // if selection spans multiple lines, default search string to empty - if (seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber) { + if ( + (seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber) + || seedSearchStringFromSelection === 'multiple' + ) { if (selection.isEmpty()) { const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition()); if (wordAtPosition) { @@ -49,10 +52,6 @@ export function getSelectionSearchString(editor: ICodeEditor, seedSearchStringFr return editor.getModel().getValueInRange(selection); } } - } else if (seedSearchStringFromSelection === 'multiple') { - if (editor.getModel().getValueLengthInRange(selection) < SEARCH_STRING_MAX_LENGTH) { - return editor.getModel().getValueInRange(selection); - } } return null;