Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to R Console will be documented in this file.

## [0.4.4] - 2026-08-05

### Fixed

- Fixed some valid R commands with balanced square brackets being incorrectly treated as incomplete during execution.

## [0.4.3] - 2026-07-16

### Recent changes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vsc-r-console",
"displayName": "R Console for VS Code",
"description": "A lightweight R console for VS Code",
"version": "0.4.3",
"version": "0.4.4",
"publisher": "RConsole",
"license": "SEE LICENSE IN LICENSE",
"icon": "images/Rlogo.png",
Expand Down
17 changes: 3 additions & 14 deletions src/Language/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ interface ParserState {
parenDepth: number;
braceDepth: number;
bracketDepth: number;
dblBracketDepth: number;
}

export async function isExpressionCompleteAsync(code: string): Promise<boolean> {
Expand Down Expand Up @@ -648,7 +647,6 @@ function classifyExpressionHeuristic(code: string): LocalParseClassification {
parenDepth: 0,
braceDepth: 0,
bracketDepth: 0,
dblBracketDepth: 0,
};
let sawUnknownToken = false;

Expand Down Expand Up @@ -685,18 +683,10 @@ function classifyExpressionHeuristic(code: string): LocalParseClassification {
state.braceDepth -= 1;
break;
case TokenType.LeftBracket:
if (token.value === "[[") {
state.dblBracketDepth += 1;
} else {
state.bracketDepth += 1;
}
state.bracketDepth += token.value.length;
break;
case TokenType.RightBracket:
if (token.value === "]]") {
state.dblBracketDepth -= 1;
} else {
state.bracketDepth -= 1;
}
state.bracketDepth -= token.value.length;
break;
case TokenType.Unknown:
sawUnknownToken = true;
Expand All @@ -709,8 +699,7 @@ function classifyExpressionHeuristic(code: string): LocalParseClassification {
if (
state.parenDepth > 0 ||
state.braceDepth > 0 ||
state.bracketDepth > 0 ||
state.dblBracketDepth > 0
state.bracketDepth > 0
) {
return "incomplete";
}
Expand Down
Loading