Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore cancellation errors due to mouse out #178851

Merged
merged 1 commit into from Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/vs/platform/quickinput/browser/quickInputList.ts
Expand Up @@ -18,6 +18,7 @@ import { range } from 'vs/base/common/arrays';
import { ThrottledDelayer } from 'vs/base/common/async';
import { compareAnything } from 'vs/base/common/comparers';
import { memoize } from 'vs/base/common/decorators';
import { isCancellationError } from 'vs/base/common/errors';
import { Emitter, Event } from 'vs/base/common/event';
import { IMatch } from 'vs/base/common/filters';
import { IMarkdownString } from 'vs/base/common/htmlContent';
Expand Down Expand Up @@ -410,11 +411,18 @@ export class QuickInputList {
) {
return;
}
await delayer.trigger(async () => {
if (e.element) {
this.showHover(e.element);
try {
await delayer.trigger(async () => {
if (e.element) {
this.showHover(e.element);
}
});
} catch (e) {
// Ignore cancellation errors due to mouse out
if (!isCancellationError(e)) {
throw e;
}
});
}
}));
this.disposables.push(this.list.onMouseOut(e => {
// onMouseOut triggers every time a new element has been moused over
Expand Down