Space sync now scheduled
This commit is contained in:
@@ -166,6 +166,11 @@ export class SyncService {
|
||||
this.filesScheduledForSync.delete(path);
|
||||
}
|
||||
|
||||
async scheduleSpaceSync(): Promise<void> {
|
||||
await this.noOngoingSync(5000);
|
||||
await this.syncSpace();
|
||||
}
|
||||
|
||||
start() {
|
||||
this.syncSpace().catch(console.error);
|
||||
|
||||
|
||||
@@ -184,10 +184,6 @@ export function editorSyscalls(editor: Client): SysCallMapping {
|
||||
const cm = vimGetCm(editor.editorView)!;
|
||||
return Vim.handleEx(cm, exCommand);
|
||||
},
|
||||
// Sync
|
||||
"editor.syncSpace": () => {
|
||||
return editor.syncService.syncSpace();
|
||||
},
|
||||
// Folding
|
||||
"editor.fold": () => {
|
||||
foldCode(editor.editorView);
|
||||
|
||||
@@ -12,5 +12,8 @@ export function syncSyscalls(editor: Client): SysCallMapping {
|
||||
"sync.scheduleFileSync": (_ctx, path: string): Promise<void> => {
|
||||
return editor.syncService.scheduleFileSync(path);
|
||||
},
|
||||
"sync.scheduleSpaceSync": () => {
|
||||
return editor.syncService.scheduleSpaceSync();
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user