mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-28 08:04:00 +01:00
@@ -905,7 +905,12 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
||||
|
||||
this.xterm?.refresh();
|
||||
|
||||
setTimeout(() => this._initDragAndDrop(container));
|
||||
setTimeout(() => {
|
||||
if (this._store.isDisposed) {
|
||||
return;
|
||||
}
|
||||
this._initDragAndDrop(container);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -266,6 +266,9 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
|
||||
this._shellIntegrationAddon = new ShellIntegrationAddon(options.shellIntegrationNonce ?? '', options.disableShellIntegrationReporting, this._telemetryService, this._logService);
|
||||
this.raw.loadAddon(this._shellIntegrationAddon);
|
||||
this._xtermAddonLoader.importAddon('clipboard').then(ClipboardAddon => {
|
||||
if (this._store.isDisposed) {
|
||||
return;
|
||||
}
|
||||
this._clipboardAddon = this._instantiationService.createInstance(ClipboardAddon, undefined, {
|
||||
async readText(type: ClipboardSelectionType): Promise<string> {
|
||||
return _clipboardService.readText(type === 'p' ? 'selection' : 'clipboard');
|
||||
@@ -470,6 +473,9 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
|
||||
private _getSearchAddon(): Promise<SearchAddonType> {
|
||||
if (!this._searchAddonPromise) {
|
||||
this._searchAddonPromise = this._xtermAddonLoader.importAddon('search').then((AddonCtor) => {
|
||||
if (this._store.isDisposed) {
|
||||
return Promise.reject('Could not create search addon, terminal is disposed');
|
||||
}
|
||||
this._searchAddon = new AddonCtor({ highlightLimit: XtermTerminalConstants.SearchHighlightLimit });
|
||||
this.raw.loadAddon(this._searchAddon);
|
||||
this._searchAddon.onDidChangeResults((results: { resultIndex: number; resultCount: number }) => {
|
||||
|
||||
Reference in New Issue
Block a user