Skip to content

Commit

Permalink
Add allowIncomplete to runtime.executeCode() (#664)
Browse files Browse the repository at this point in the history
* Add `allowIncomplete` to `runtime.executeCode()`

* Update changelog
  • Loading branch information
juliasilge authored Feb 18, 2025
1 parent 46c6d38 commit 1375251
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit 1375251

Please sign in to comment.