Skip to content

Commit 218b33b

Browse files
committed
Support for mixed case prefixes
Signed-off-by: worksofliam <[email protected]>
1 parent c91b740 commit 218b33b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/views/results/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ async function runMultipleHandler(mode: `all`|`selected`|`from`) {
173173

174174
switch (mode) {
175175
case `selected`:
176-
const doc = editor.document;
177176
const firstStatement = statementGroups.findIndex(group => (startPos >= group.range.start && startPos <= group.range.end));
178177
const lastStatement = statementGroups.findIndex(group => (endPos >= group.range.start && endPos <= group.range.end));
179178
statementsToRun = statementGroups.slice(firstStatement, lastStatement + 1);
@@ -195,7 +194,7 @@ async function runMultipleHandler(mode: `all`|`selected`|`from`) {
195194
}
196195

197196
const label = statement.getLabel();
198-
const prefix = (label as StatementQualifier) || `statement`;
197+
const prefix = (label || `statement`).toLowerCase() as StatementQualifier;
199198

200199
if (!ALLOWED_PREFIXES_FOR_MULTIPLE.includes(prefix)) {
201200
vscode.window.showErrorMessage(`Cannot run multiple statements with prefix ${prefix}.`);

0 commit comments

Comments
 (0)