Skip to content

fix: enforce a non-negative R console tab size - #96

Merged
Fred-Wu merged 2 commits into
mainfrom
fix/nonnegative-tab-size
Nov 18, 2026
Merged

Fred-Wu merged 2 commits into
mainfrom
fix/nonnegative-tab-size

Conversation

@Fred-Wu

@Fred-Wu Fred-Wu commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

Require r.console.tabSize to be a non-negative integer. Previously, a negative value could make Tab throw a RangeError. Existing negative integers now clamp to 0, and fractional or nonnumeric values fall back to the default of 2.

With a tab size of 0, Tab adds no indentation and Backspace still removes one leading space. Regression tests cover Tab, Backspace, and automatic indentation.

Testing: Type-checking and 574 unit tests passed on macOS.

@Fred-Wu
Fred-Wu marked this pull request as ready for review November 18, 2026 14:30
@Fred-Wu
Fred-Wu merged commit 857ca56 into main Nov 18, 2026
9 checks passed
@Fred-Wu
Fred-Wu deleted the fix/nonnegative-tab-size branch November 18, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant