mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 07:24:49 +01:00
This commit is contained in:
parent
8266b94710
commit
2aa513cc98
3 changed files with 19 additions and 19 deletions
|
@ -37,7 +37,7 @@ export async function apply_changes_to_buffer(path: string, controller: codemp.B
|
||||||
})) {
|
})) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
controller.ack(event.version);
|
controller.ack(event.version);
|
||||||
}
|
}
|
||||||
locks.delete(path);
|
locks.delete(path);
|
||||||
|
|
|
@ -120,22 +120,22 @@ export async function join(selected: vscode.TreeItem | undefined) {
|
||||||
|
|
||||||
|
|
||||||
workspaceState.workspace.callback(async function (controller: codemp.Workspace) {
|
workspaceState.workspace.callback(async function (controller: codemp.Workspace) {
|
||||||
while(true){
|
while (true) {
|
||||||
if (workspaceState.workspace === null) {
|
if (workspaceState.workspace === null) {
|
||||||
controller.clearCallback();
|
controller.clearCallback();
|
||||||
LOGGER.info("left workspace, stopping receiving events");
|
LOGGER.info("left workspace, stopping receiving events");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let event = await workspaceState.workspace.tryRecv();
|
let event = await workspaceState.workspace.tryRecv();
|
||||||
if (event === null) break;
|
if (event === null) break;
|
||||||
if (event.type == "leave") {
|
if (event.type == "leave") {
|
||||||
mapping.colors_cache.get(event.value)?.clear()
|
mapping.colors_cache.get(event.value)?.clear()
|
||||||
mapping.colors_cache.delete(event.value);
|
mapping.colors_cache.delete(event.value);
|
||||||
}
|
}
|
||||||
if (event.type == "join") {
|
if (event.type == "join") {
|
||||||
mapping.colors_cache.set(event.value, new mapping.UserDecoration(event.value));
|
mapping.colors_cache.set(event.value, new mapping.UserDecoration(event.value));
|
||||||
}
|
}
|
||||||
provider.refresh();
|
provider.refresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ export async function jump(selected: vscode.TreeItem | undefined) {
|
||||||
}
|
}
|
||||||
if (!user) user = await vscode.window.showInputBox({ prompt: "username" });
|
if (!user) user = await vscode.window.showInputBox({ prompt: "username" });
|
||||||
if (!user) return; // user cancelled with ESC
|
if (!user) return; // user cancelled with ESC
|
||||||
workspaceState.follow=user;
|
workspaceState.follow = user;
|
||||||
executeJump(user);
|
executeJump(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue