mathworks / mathworks/MATLAB-extension-for-vscode
Toggle block comment (Shift+Alt+A) nests comments instead of toggling
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 435
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When block comments are toggled using Shift+Alt+A, existing block comments are never removed, only added, effectively nesting the block comments.
To Reproduce
Steps to reproduce the behavior:
- In a MATLAB file, type
x = 1 - Select
x = 1 - Type Shift+Alt+A multiple times
This will result in a structure like the following:
%{
%{
x = 3
%}
%}
Expected behavior
The first time block comments are toggled, it should insert the block comment. The second time it is toggled, the existing block comment should be removed.
Useful Information
- OS Version: Windows 11
- VS Code Version: 1.83.1
- MATLAB extension version: 1.1.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Shift+Alt+A block-comment command in the MATLAB VS Code extension and reproduce it in a MATLAB file with a selected line. Done means toggling once inserts the block comment and toggling again removes the existing block comment instead of nesting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matlab, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100