Don't send refactor requests when there is no selection
This commit is contained in:
parent
9932a4981f
commit
4edc012cf7
1 changed files with 4 additions and 0 deletions
|
@ -131,6 +131,10 @@ export default class TypeScriptRefactorProvider implements vscode.CodeActionProv
|
|||
return [];
|
||||
}
|
||||
|
||||
if (editor.selection.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const range = editor.selection;
|
||||
const args: Proto.GetApplicableRefactorsRequestArgs = vsRangeToTsFileRange(file, range);
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue