Skip to content

Commit

Permalink
Revert "fix #109756."
Browse files Browse the repository at this point in the history
This reverts commit dbe1475.
  • Loading branch information
rebornix committed Oct 30, 2020
1 parent 3f5f747 commit 29df3f3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/vs/editor/contrib/find/findController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ 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)
|| seedSearchStringFromSelection === 'multiple'
) {
if (seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber) {
if (selection.isEmpty()) {
const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition());
if (wordAtPosition) {
Expand All @@ -52,6 +49,10 @@ 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;
Expand Down

0 comments on commit 29df3f3

Please sign in to comment.