Skip to content

Commit bbc77c0

Browse files
committed
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.
1 parent c3425b5 commit bbc77c0

File tree

1 file changed

+2
-0
lines changed
  • extensions/ql-vscode/src/databases/local-databases

1 file changed

+2
-0
lines changed

extensions/ql-vscode/src/databases/local-databases/locations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ export async function showLocation(location?: Location) {
128128
// avoid preview mode so editor is sticky and will be added to navigation and search histories.
129129
preview: false,
130130
viewColumn: ViewColumn.One,
131+
// Keep the focus on the results view so that the user can easily navigate to the next result.
132+
preserveFocus: true,
131133
});
132134

133135
const range = location.range;

0 commit comments

Comments
 (0)