Skip to content

Commit e268ba4

Browse files
authored
fix: Ensure #| is added only at the beginning of a new line (#649)
* fix: add offset to ensure `#|` is added at the beginning Fixes #426 * chore: add changelog entry
1 parent 491057b commit e268ba4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- 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>).
66
- Fix behavior in Positron when running a cell containing invalid/incomplete code (<https://github.com/quarto-dev/quarto/pull/664>).
7+
- Ensure `#|` is added only at the beginning of a new line (<https://github.com/quarto-dev/quarto/pull/649>).
78
- Fix `language` typos throughout the codebase (<https://github.com/quarto-dev/quarto/pull/650>)
89

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

apps/vscode/src/providers/option.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function handleOptionEnter(editor: TextEditor, comment: string) {
8484
});
8585
} else if (currentLine.startsWith(optionComment)) {
8686
editor.edit((builder) => {
87-
builder.insert(editor.selection.start.translate(1, 0), optionComment);
87+
builder.insert(editor.selection.start.translate(1, -editor.selection.active.character), optionComment);
8888
});
8989
}
9090
}

0 commit comments

Comments
 (0)