mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
fix #109756.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user