Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extensions/ql-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Remove "last updated" information and sorting from variant analysis results view. [#2637](https://github.com/github/vscode-codeql/pull/2637)
- Links to code on GitHub now include column numbers as well as line numbers. [#2406](https://github.com/github/vscode-codeql/pull/2406)
- No longer highlight trailing commas for jump to definition. [#2615](https://github.com/github/vscode-codeql/pull/2615)
- Fix a bug where the QHelp preview page was not being refreshed after changes to the underlying `.qhelp` file.
Comment thread
aeisenberg marked this conversation as resolved.
Outdated

## 1.8.8 - 17 July 2023

Expand Down
1 change: 1 addition & 0 deletions extensions/ql-vscode/src/common/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type BuiltInVsCodeCommands = {
// The codeQLDatabases.focus command is provided by VS Code because we've registered the custom view
"codeQLDatabases.focus": () => Promise<void>;
"markdown.showPreviewToSide": (uri: Uri) => Promise<void>;
"workbench.action.closeActiveEditor": () => Promise<void>;
revealFileInOS: (uri: Uri) => Promise<void>;
setContext: (
key: `${"codeql" | "codeQL"}${string}`,
Expand Down
11 changes: 10 additions & 1 deletion extensions/ql-vscode/src/language-support/query-editor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Uri, window } from "vscode";
import { Uri, ViewColumn, window, workspace } from "vscode";
Comment thread Fixed
import { CodeQLCliServer } from "../codeql-cli/cli";
import { QueryRunner } from "../query-server";
import { basename, join } from "path";
Expand Down Expand Up @@ -74,7 +74,16 @@ async function previewQueryHelp(
const uri = Uri.file(absolutePathToMd);
try {
await cliServer.generateQueryHelp(pathToQhelp, absolutePathToMd);
// Open the raw markdown file as well as the rendered file.
// This will force the rendered page to refresh if there has been a change to the markdown.
await window.showTextDocument(uri, {
viewColumn: ViewColumn.Active,
});
await commandManager.execute("markdown.showPreviewToSide", uri);
// close the editor we just opened. Users will see a brief flicker of this editor
// being opened, but doing so will ensure that the preview is refreshed.
await window.showTextDocument(uri);
await commandManager.execute("workbench.action.closeActiveEditor");
} catch (e) {
const errorMessage = getErrorMessage(e).includes(
"Generating qhelp in markdown",
Expand Down