refactor(users/Profpatsch/lyric/ext): move command into fn

Change-Id: I2d38455cdf881e03a390d129f9cee3f9eeca485d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12548
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2024-09-29 14:44:21 +02:00
parent 9bec21ea1c
commit 02713e054f

View file

@ -4,7 +4,11 @@ import * as net from 'net';
export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(...registerCheckLineTimestamp(context));
context.subscriptions.push(
vscode.commands.registerCommand('extension.jumpToLrcPosition', () => {
vscode.commands.registerCommand('extension.jumpToLrcPosition', jumpToLrcPosition),
);
}
function jumpToLrcPosition() {
const editor = vscode.window.activeTextEditor;
if (!editor) {
@ -41,8 +45,6 @@ export function activate(context: vscode.ExtensionContext) {
socket.on('error', err => {
vscode.window.showErrorMessage(`Failed to send command: ${err.message}`);
});
}),
);
}
// If the difference to the timestamp on the next line is larger than 10 seconds, underline the next line and show a warning message on hover