File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
extensions/ql-vscode/src/query-history Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,10 @@ export class QueryHistoryManager extends DisposableObject {
292292 this . handleViewSarifAlerts . bind ( this ) ,
293293 "query" ,
294294 ) ,
295- "codeQLQueryHistory.viewDil" : this . handleViewDil . bind ( this ) ,
295+ "codeQLQueryHistory.viewDil" : createSingleSelectionCommand (
296+ this . handleViewDil . bind ( this ) ,
297+ "query" ,
298+ ) ,
296299 "codeQLQueryHistory.itemClicked" : createSingleSelectionCommand (
297300 this . handleItemClicked . bind ( this ) ,
298301 "query" ,
@@ -890,22 +893,14 @@ export class QueryHistoryManager extends DisposableObject {
890893 ) ;
891894 }
892895
893- async handleViewDil (
894- singleItem : QueryHistoryInfo ,
895- multiSelect : QueryHistoryInfo [ ] | undefined ,
896- ) {
897- // Local queries only
898- if (
899- ! this . assertSingleQuery ( multiSelect ) ||
900- singleItem . t !== "local" ||
901- ! singleItem . completedQuery
902- ) {
896+ async handleViewDil ( item : QueryHistoryInfo ) {
897+ if ( item . t !== "local" || ! item . completedQuery ) {
903898 return ;
904899 }
905900
906901 await tryOpenExternalFile (
907902 this . app . commands ,
908- await singleItem . completedQuery . query . ensureDilPath ( this . qs . cliServer ) ,
903+ await item . completedQuery . query . ensureDilPath ( this . qs . cliServer ) ,
909904 ) ;
910905 }
911906
You can’t perform that action at this time.
0 commit comments