diff --git a/extensions/ql-vscode/CHANGELOG.md b/extensions/ql-vscode/CHANGELOG.md index 7595c1511..9e7082d90 100644 --- a/extensions/ql-vscode/CHANGELOG.md +++ b/extensions/ql-vscode/CHANGELOG.md @@ -9,6 +9,7 @@ - Allow case-insensitive project slugs for GitHub repositories when adding a CodeQL database from LGTM. [#978](https://github.com/github/vscode-codeql/pull/961) - Add a _CodeQL: Preview Query Help_ command to generate Markdown previews of `.qhelp` query help files. This command should only be run in trusted workspaces. See https://codeql.github.com/docs/codeql-cli/testing-query-help-files for more information about query help. [#988](https://github.com/github/vscode-codeql/pull/988) - Make "Open Referenced File" command accessible from the active editor menu. [#989](https://github.com/github/vscode-codeql/pull/989) +- Fix a bug where result set names in the result set drop-down were disappearing when viewing a sorted table. [#1007](https://github.com/github/vscode-codeql/pull/1007) - Allow query result locations with 0 as the end column value. These are treated as the first column in the line. [#1002](https://github.com/github/vscode-codeql/pull/1002) ## 1.5.6 - 07 October 2021 diff --git a/extensions/ql-vscode/src/interface.ts b/extensions/ql-vscode/src/interface.ts index ddca9e617..100e39417 100644 --- a/extensions/ql-vscode/src/interface.ts +++ b/extensions/ql-vscode/src/interface.ts @@ -365,8 +365,7 @@ export class InterfaceManager extends DisposableObject { const showButton = 'View Results'; const queryName = results.queryName; const resultPromise = vscode.window.showInformationMessage( - `Finished running query ${ - queryName.length > 0 ? ` "${queryName}"` : '' + `Finished running query ${queryName.length > 0 ? ` "${queryName}"` : '' }.`, showButton ); @@ -502,7 +501,12 @@ export class InterfaceManager extends DisposableObject { ); const resultSetSchemas = await this.getResultSetSchemas(results, sorted ? selectedTable : ''); - const resultSetNames = resultSetSchemas.map(schema => schema.name); + + // If there is a specific sorted table selected, a different bqrs file is loaded that doesn't have all the result set names. + // Make sure that we load all result set names here. + // See https://github.com/github/vscode-codeql/issues/1005 + const allResultSetSchemas = sorted ? await this.getResultSetSchemas(results, '') : resultSetSchemas; + const resultSetNames = allResultSetSchemas.map(schema => schema.name); const schema = resultSetSchemas.find( (resultSet) => resultSet.name == selectedTable