Skip to content

Commit 3730d2a

Browse files
committed
Do not update selection filter when clicking a link
1 parent 60598c6 commit 3730d2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extensions/ql-vscode/src/view/results/ResultsApp.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ export function ResultsApp() {
230230
case "setEditorSelection":
231231
if (msg.selection) {
232232
const selection = msg.selection;
233+
const wasFromUserInteraction = msg.wasFromUserInteraction ?? false;
233234
setState((prev) => {
235+
if (prev.selectionFilterEnabled && !wasFromUserInteraction) {
236+
return prev; // Ignore selection changes we caused ourselves while filter was active
237+
}
234238
return {
235239
...prev,
236240
editorSelection: selection,

0 commit comments

Comments
 (0)