Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowIncomplete to runtime.executeCode() #664

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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 apps/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.119.0 (unreleased)

- Use `QUARTO_VISUAL_EDITOR_CONFIRMED` > `PW_TEST` > `CI` to bypass (`true`) or force (`false`) the Visual Editor confirmation dialogue (<https://github.com/quarto-dev/quarto/pull/654>).
- Fix behavior in Positron when running a cell containing invalid/incomplete code (<https://github.com/quarto-dev/quarto/pull/664>).

## 1.118.0 (Release on 2024-11-26)

Expand Down
3 changes: 2 additions & 1 deletion apps/vscode/src/@types/hooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ declare module 'positron' {
executeCode(
languageId: string,
code: string,
focus: boolean
focus: boolean,
allowIncomplete: boolean
): Thenable<boolean>;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/vscode/src/host/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function hooksExtensionHost(): ExtensionHost {
// Our callback executes each block sequentially
const callback = async () => {
for (const block of blocks) {
await runtime.executeCode(language, block, false);
await runtime.executeCode(language, block, false, true);
}
}

Expand Down