Skip to content

Scripting terminal: code-aware line wrapping - #93

Merged
rubensworks merged 1 commit into
master-1.21-ltsfrom
terminal-ux-clean/8-wrap-and-create
Oct 19, 2026
Merged

rubensworks merged 1 commit into
master-1.21-ltsfrom
terminal-ux-clean/8-wrap-and-create

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Stacked on #90.

Wrap long lines at spaces and punctuation. Lines used to break at any character, so idContext.ops.itemstackIsStackable(item) became itemstackIsSta / ckable(item). Lines now break:

  • after spaces, commas and brackets
  • before . (except inside numbers)
  • around operators, without splitting && or >=

Tokens longer than the line still get a hard break. Wrapped lines show a small ↳ in the gutter. The wrapping logic is in TextEditing.wrapLines, with unit tests. I checked in-game that clicking and typing on wrapped lines still hit the right position.

Opening new scripts after creating them was moved to its own PR, #97.

I left out the planned line:column indicator. The gutter already highlights the current line, and there's no free space for it that wouldn't cover code or the binding row.

Validation: ./gradlew build and runGameTestServer pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9

Lines were broken at any character, splitting identifiers such as
itemstackIsStackable over two lines. Lines now break after spaces,
commas and brackets, before member accesses, and around operators,
and wrapped lines are marked in the gutter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
@github-actions

Copy link
Copy Markdown

Coverage Report for CI Build 39159789675

Coverage increased (+0.6%) to 42.991%

Details

  • Coverage increased (+0.6%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 348 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

348 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
org/cyclops/integratedscripting/client/gui/container/ContainerScreenTerminalScripting.java 238 0.0%
org/cyclops/integratedscripting/client/gui/component/input/WidgetTextArea.java 104 0.0%
org/cyclops/integratedscripting/client/gui/component/input/TextEditing.java 6 93.18%

Coverage Stats

Coverage Status
Relevant Lines: 3699
Covered Lines: 1724
Line Coverage: 46.61%
Relevant Branches: 1623
Covered Branches: 564
Branch Coverage: 34.75%
Branches in Coverage %: Yes
Coverage Strength: 23.12 hits per line

💛 - Coveralls

@rubensworks
rubensworks force-pushed the terminal-ux-clean/8-wrap-and-create branch from 9f57696 to ee16f1a Compare October 19, 2026 05:37
@rubensworks rubensworks changed the title Scripting terminal: code-aware line wrapping, open new scripts Scripting terminal: code-aware line wrapping Oct 19, 2026
Base automatically changed from terminal-ux-clean/7-open-folder to master-1.21-lts October 19, 2026 17:51
@rubensworks
rubensworks merged commit adcaf7c into master-1.21-lts Oct 19, 2026
23 checks passed
@rubensworks
rubensworks deleted the terminal-ux-clean/8-wrap-and-create branch October 19, 2026 17:51
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.

2 participants