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 {
592592 ) ;
593593 }
594594
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 ) ;
601596
602597 let toItem : CompletedLocalQueryInfo | undefined = undefined ;
603598 try {
@@ -1070,6 +1065,21 @@ export class QueryHistoryManager extends DisposableObject {
10701065 }
10711066 }
10721067
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+
10731083 private async findOtherQueryToCompare (
10741084 fromItem : CompletedLocalQueryInfo ,
10751085 allItemsSelected : CompletedLocalQueryInfo [ ] ,
You can’t perform that action at this time.
0 commit comments