File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
extensions/ql-vscode/src/query-history Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -592,12 +592,7 @@ export class QueryHistoryManager extends DisposableObject {
592
592
) ;
593
593
}
594
594
595
- const fromItem =
596
- this . compareWithItem &&
597
- this . isSuccessfulCompletedLocalQueryInfo ( this . compareWithItem ) &&
598
- multiSelect . includes ( this . compareWithItem )
599
- ? this . compareWithItem
600
- : singleItem ;
595
+ const fromItem = this . getFromQueryToCompare ( singleItem , multiSelect ) ;
601
596
602
597
let toItem : CompletedLocalQueryInfo | undefined = undefined ;
603
598
try {
@@ -1070,6 +1065,21 @@ export class QueryHistoryManager extends DisposableObject {
1070
1065
}
1071
1066
}
1072
1067
1068
+ private getFromQueryToCompare (
1069
+ singleItem : CompletedLocalQueryInfo ,
1070
+ multiSelect : CompletedLocalQueryInfo [ ] ,
1071
+ ) : CompletedLocalQueryInfo {
1072
+ if (
1073
+ this . compareWithItem &&
1074
+ this . isSuccessfulCompletedLocalQueryInfo ( this . compareWithItem ) &&
1075
+ multiSelect . includes ( this . compareWithItem )
1076
+ ) {
1077
+ return this . compareWithItem ;
1078
+ } else {
1079
+ return singleItem ;
1080
+ }
1081
+ }
1082
+
1073
1083
private async findOtherQueryToCompare (
1074
1084
fromItem : CompletedLocalQueryInfo ,
1075
1085
allItemsSelected : CompletedLocalQueryInfo [ ] ,
You can’t perform that action at this time.
0 commit comments