Skip to content

Commit ac4929d

Browse files
authored
WorkspaceSymbolProvider should match case-insensitively (#1386)
1 parent 4273bab commit ac4929d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/WorkspaceSymbolProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
2626
private readonly _sqlDocs: string =
2727
"%Library.RoutineMgr_StudioOpenDialog(?,1,1,?,1,0,?,'Type = 4',0,?) AS sod ON mem.Parent = $EXTRACT(sod.Name,1,$LENGTH(sod.Name)-4)";
2828

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

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

0 commit comments

Comments
 (0)