Update extensions/ql-vscode/src/run-queries-shared.ts
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
@@ -455,7 +455,7 @@ export async function getQuickEvalContext(
|
|||||||
const quickEvalPosition = await getSelectedPosition(editor, range);
|
const quickEvalPosition = await getSelectedPosition(editor, range);
|
||||||
let quickEvalText: string;
|
let quickEvalText: string;
|
||||||
if (!editor.selection?.isEmpty) {
|
if (!editor.selection?.isEmpty) {
|
||||||
quickEvalText = editor.document.getText(editor.selection);
|
quickEvalText = editor.document.getText(editor.selection).trim();
|
||||||
} else {
|
} else {
|
||||||
// capture the entire line if the user didn't select anything
|
// capture the entire line if the user didn't select anything
|
||||||
const line = editor.document.lineAt(editor.selection.active.line);
|
const line = editor.document.lineAt(editor.selection.active.line);
|
||||||
|
|||||||
Reference in New Issue
Block a user