Don't send refactor requests when there is no selection

This commit is contained in:
Matt Bierner 2017-11-20 19:42:36 -08:00
parent 9932a4981f
commit 4edc012cf7

View file

@ -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 {