Skip to content

Commit 43f356a

Browse files
committed
Fix module imports in main causing captions compile to be registered twice
1 parent 256c0ea commit 43f356a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/compiler/captions-compile.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ import { compileSomething } from "./compiler-base";
99
let ccChannel: OutputChannel;
1010

1111
export async function init(context: ExtensionContext): Promise<void> {
12-
const commandList = await commands.getCommands(true);
13-
const exists = commandList.some(c => c === "captions.compile");
14-
if(!exists) {
15-
const ccCommand = commands.registerTextEditorCommand("captions.compile", compileCaptions);
16-
context.subscriptions.push(ccCommand);
17-
}
12+
const ccCommand = commands.registerTextEditorCommand("captions.compile", compileCaptions);
13+
context.subscriptions.push(ccCommand);
1814
}
1915

2016
async function compileCaptions(editor: TextEditor): Promise<void> {

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import * as vmt from "./language/LangVmt";
88
import * as captions from "./language/LangCaptions";
99
import * as keyvalue from "./language/LangKv";
1010
import * as captionsCompile from "./compiler/captions-compile";
11-
import * as modelCompile from "./compiler/captions-compile";
12-
import * as performance from "./compiler/model-compile";
11+
import * as modelCompile from "./compiler/model-compile";
12+
import * as performance from "./performance";
1313
import * as kvDetect from "./KvFileDetection";
1414

1515
import * as packageJson from "../package.json";

0 commit comments

Comments
 (0)