mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-25 17:04:48 +01:00
feat: workspace event handling, waiting for PR
it should work but the Workspace::event() function is not available to js yet, waiting for https://github.com/hexedtech/codemp/pull/19 to get merged and included in next release
This commit is contained in:
parent
c03ea41f16
commit
e7bb5ce91f
1 changed files with 22 additions and 0 deletions
|
@ -95,6 +95,28 @@ export async function join(selected: vscode.TreeItem | undefined) {
|
||||||
}
|
}
|
||||||
await controller.send(cursor);
|
await controller.send(cursor);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO waiting for https://github.com/hexedtech/codemp/pull/19 to reach npm
|
||||||
|
// let event_handler = async () => {
|
||||||
|
// try {
|
||||||
|
// while (true) {
|
||||||
|
// if (workspace === null) break;
|
||||||
|
// let event = await workspace.event();
|
||||||
|
// if (event.type == "leave") {
|
||||||
|
// mapping.colors_cache.get(event.value)?.clear()
|
||||||
|
// mapping.colors_cache.delete(event.value);
|
||||||
|
// }
|
||||||
|
// if (event.type == "join") {
|
||||||
|
// mapping.colors_cache.set(event.value, new mapping.UserDecoration(event.value));
|
||||||
|
// }
|
||||||
|
// provider.refresh();
|
||||||
|
// }
|
||||||
|
// } catch (e) {
|
||||||
|
// console.log(`stopping event handler for workspace: ${e}`);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// event_handler();
|
||||||
|
|
||||||
vscode.window.showInformationMessage("Connected to workspace");
|
vscode.window.showInformationMessage("Connected to workspace");
|
||||||
provider.refresh();
|
provider.refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue