From bbc77c051916c2c4db1afa555c016c6697e14a78 Mon Sep 17 00:00:00 2001 From: Koen Vlaswinkel Date: Fri, 24 Nov 2023 14:19:20 +0100 Subject: [PATCH 1/2] Preserve focus on results viewer when showing location This preserves the focus on the results viewer when showing a location to ensure that the user can navigate to the next result without having to click or change the focus to the results viewer first. This allows the user to quickly navigate through the results. --- extensions/ql-vscode/src/databases/local-databases/locations.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/ql-vscode/src/databases/local-databases/locations.ts b/extensions/ql-vscode/src/databases/local-databases/locations.ts index 9625cca3d67..ff9ccc3afea 100644 --- a/extensions/ql-vscode/src/databases/local-databases/locations.ts +++ b/extensions/ql-vscode/src/databases/local-databases/locations.ts @@ -128,6 +128,8 @@ export async function showLocation(location?: Location) { // avoid preview mode so editor is sticky and will be added to navigation and search histories. preview: false, viewColumn: ViewColumn.One, + // Keep the focus on the results view so that the user can easily navigate to the next result. + preserveFocus: true, }); const range = location.range; From 6324a197292237ddd638cd8f00312de7f0f6ff9b Mon Sep 17 00:00:00 2001 From: Koen Vlaswinkel Date: Fri, 24 Nov 2023 14:21:03 +0100 Subject: [PATCH 2/2] Update CHANGELOG --- extensions/ql-vscode/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/ql-vscode/CHANGELOG.md b/extensions/ql-vscode/CHANGELOG.md index 3c8913dda64..437c23ced8f 100644 --- a/extensions/ql-vscode/CHANGELOG.md +++ b/extensions/ql-vscode/CHANGELOG.md @@ -4,6 +4,7 @@ - Add a prompt to the "Quick query" command to encourage users in single-folder workspaces to use "Create query" instead. [#3082](https://github.com/github/vscode-codeql/pull/3082) - Remove support for CodeQL CLI versions older than 2.11.6. [#3087](https://github.com/github/vscode-codeql/pull/3087) +- Preserve focus on results viewer when showing a location in a file. [#3088](https://github.com/github/vscode-codeql/pull/3088) ## 1.10.0 - 16 November 2023