Skip to content

Commit

Permalink
WorkspaceSymbolProvider should match case-insensitively (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano authored Jun 24, 2024
1 parent 4273bab commit ac4929d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/WorkspaceSymbolProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
private readonly _sqlDocs: string =
"%Library.RoutineMgr_StudioOpenDialog(?,1,1,?,1,0,?,'Type = 4',0,?) AS sod ON mem.Parent = $EXTRACT(sod.Name,1,$LENGTH(sod.Name)-4)";

private readonly _sqlSuffix: string = " WHERE mem.Name LIKE ? ESCAPE '\\'";
private readonly _sqlSuffix: string = " WHERE LOWER(mem.Name) LIKE ? ESCAPE '\\'";

/**
* Convert the query results to VS Code symbols. Needs to be typed as `any[]`
Expand Down Expand Up @@ -90,7 +90,7 @@ export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
if (!vscode.workspace.workspaceFolders?.length) return;
// Convert query to a LIKE compatible pattern
let pattern = "%";
for (const c of query) pattern += `${["_", "%", "\\"].includes(c) ? "\\" : ""}${c}%`;
for (const c of query.toLowerCase()) pattern += `${["_", "%", "\\"].includes(c) ? "\\" : ""}${c}%`;
if (token.isCancellationRequested) return;
// Get results for all workspace folders
return Promise.allSettled(
Expand Down

0 comments on commit ac4929d

Please sign in to comment.