Resolve todos, move process creation after xterm

Having _processManager.createProcess called before _createXterm was causing
some event listeners like onProcessReady to fire before they were registered
within _createXterm.
This commit is contained in:
Daniel Imms
2020-06-21 08:12:13 -07:00
parent 34b20f9609
commit cb5ddcf44f
6 changed files with 35 additions and 32 deletions

View File

@@ -176,7 +176,6 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
public $startLinkProvider(): void {
this._linkProvider?.dispose();
// TODO: Verify sharing a link provider works fine with removal of intersecting links
this._linkProvider = this._terminalService.registerLinkProvider(new ExtensionTerminalLinkProvider(this._proxy));
}
@@ -432,10 +431,7 @@ class ExtensionTerminalLinkProvider implements ITerminalExternalLinkProvider {
startIndex: dto.startIndex,
length: dto.length,
label: dto.label,
activate(text: string) {
console.log('Activated! ' + text);
proxy.$activateLink(instance.id, dto.id);
}
activate: () => proxy.$activateLink(instance.id, dto.id)
}));
}
}

View File

@@ -627,8 +627,6 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
// when new links are provided.
this._terminalLinkCache.delete(terminalId);
// TODO: Store link activate callback
// TODO: Discard of links when appropriate
const result: ITerminalLinkDto[] = [];
const context: vscode.TerminalLinkContext = { terminal, line };
const promises: vscode.ProviderResult<{ provider: vscode.TerminalLinkProvider, links: vscode.TerminalLink[] }>[] = [];