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

Quick Pick imprecise filtering breaks after 60 characters #219210

Open
Luke-Callaghan23 opened this issue Jun 28, 2024 · 3 comments
Open

Quick Pick imprecise filtering breaks after 60 characters #219210

Luke-Callaghan23 opened this issue Jun 28, 2024 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug quick-pick Quick-pick widget issues
Milestone

Comments

@Luke-Callaghan23
Copy link

Luke-Callaghan23 commented Jun 28, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.91.0-Insiders, 1.90.2
  • OS Version: Windows 11, Ubuntu 18 (in WSL)

The filtering for quick pick items which lets you skip characters or words seems to not work on longer strings. Filtering does not work after the 60th character in the string (it seems).

Steps to Reproduce:

  1. Create a quick pick menu with these options:
await vscode.window.showQuickPick([
	"Alpha Bravo Charlie Delta Echo Foxtrot Golf Hotel India Juliett Kilo Lima Mike November Oscar Papa Quebec Romeo Sierra Tango Uniform Victor Whiskey X-ray Yankee Zulu",
	"alpha bravo charlie delta echo foxtrot golf hotel india juliett kilo lima mike november oscar papa quebec romeo sierra tango uniform victor whiskey x-ray yankee zulu"
], {
	canPickMany: false,
	title: "Example",
});

  1. In the search bar, type: "Alpha Juli". Both options will remain unfiltered and the strings "Alpha" and "Juli" will be highlighted separately:

image

  1. Type "e". Both options now get filtered:

image

  1. All imprecise searching seems to break after the 60th character (which is the 'e' in 'Juliett'):
Untitled.video.-.Made.with.Clipchamp.1.mp4
@TylerLeonhardt
Copy link
Member

This is because of this line:

// TODO: Consider removing this check
if (camelCaseWord.length > 60) {
camelCaseWord = camelCaseWord.substring(0, 60);
}

Which is cut off likely for performance reasons. Maybe it's worth bumping to a larger number.

@TylerLeonhardt TylerLeonhardt added the bug Issue identified by VS Code Team member as probable bug label Jul 18, 2024
@TylerLeonhardt
Copy link
Member

@joaomoreno @bpasero your names are all over this file. Any advice?

@TylerLeonhardt TylerLeonhardt added the quick-pick Quick-pick widget issues label Jul 18, 2024
@TylerLeonhardt TylerLeonhardt added this to the Backlog milestone Jul 18, 2024
@bpasero
Copy link
Member

bpasero commented Jul 26, 2024

Predates my knowledge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug quick-pick Quick-pick widget issues
Projects
None yet
Development

No branches or pull requests

4 participants