mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-17 09:23:32 +01:00
Fixes #182559 This scopes the fix from #175603 to just the suggest widget and reverts the change to `mainThreadCommands`
This commit is contained in:
@@ -7,7 +7,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria';
|
||||
import { isNonEmptyArray } from 'vs/base/common/arrays';
|
||||
import { IdleValue } from 'vs/base/common/async';
|
||||
import { CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { onUnexpectedError, onUnexpectedExternalError } from 'vs/base/common/errors';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { KeyCodeChord } from 'vs/base/common/keybindings';
|
||||
@@ -432,7 +432,13 @@ export class SuggestController implements IEditorContribution {
|
||||
this.model.trigger({ auto: true, retrigger: true });
|
||||
} else {
|
||||
// exec command, done
|
||||
tasks.push(this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])).catch(onUnexpectedError));
|
||||
tasks.push(this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])).catch(e => {
|
||||
if (item.completion.extensionId) {
|
||||
onUnexpectedExternalError(e);
|
||||
} else {
|
||||
onUnexpectedError(e);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
import { DisposableMap, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { revive } from 'vs/base/common/marshalling';
|
||||
import { CommandsRegistry, ICommandHandlerDescription, ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IExtHostContext, extHostNamedCustomer } from 'vs/workbench/services/extensions/common/extHostCustomers';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
|
||||
import { Dto, SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
import { ExtHostCommandsShape, ExtHostContext, MainContext, MainThreadCommandsShape } from '../common/extHost.protocol';
|
||||
import { onUnexpectedExternalError } from 'vs/base/common/errors';
|
||||
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadCommands)
|
||||
@@ -60,7 +59,7 @@ export class MainThreadCommands implements MainThreadCommandsShape {
|
||||
CommandsRegistry.registerCommand(id, (accessor, ...args) => {
|
||||
return this._proxy.$executeContributedCommand(id, ...args).then(result => {
|
||||
return revive(result);
|
||||
}, onUnexpectedExternalError);
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user