Skip to content

Commit

Permalink
commands: fix argument not being properly passed to .run
Browse files Browse the repository at this point in the history
  • Loading branch information
71 committed Aug 28, 2022
1 parent cd05df6 commit ad61336
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/misc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Argument, InputOr, RegisterOr } from ".";
import { commands as apiCommands, run as apiRun, command, compileFunction, Context, findMenu, keypressForRegister, Menu, notifyPromptActionRequested, prompt, promptNumber, runIsEnabled, showLockedMenu, showMenu, showMenuAfterDelay, validateMenu } from "../api";
import { run as apiRun, buildCommands, command, compileFunction, Context, findMenu, keypressForRegister, Menu, notifyPromptActionRequested, prompt, promptNumber, runIsEnabled, showLockedMenu, showMenu, showMenuAfterDelay, validateMenu } from "../api";
import type { Extension } from "../state/extension";
import type { Register } from "../state/registers";
import { ArgumentError, CancellationError, InputError } from "../utils/errors";
Expand Down Expand Up @@ -150,7 +150,7 @@ export async function run(
if (typeof argument["code"] === "string" && runIsEnabled()) {
// Prefer "code" to the "commands" array.
} else {
return apiCommands(...commands);
return buildCommands(commands, _.extension)(argument, _);
}
}

Expand Down

0 comments on commit ad61336

Please sign in to comment.