Relocate enveditor's DS2-only textarea.go additions to textarea_ds2.go - #156
Merged
Merged
Conversation
textarea.go is meant to stay closely aligned with upstream bubbles' textarea for easier future syncs (see textarea_ds2.go's header comment). Moved 10 functions that were pure DS2 additions -- never modifications of upstream code -- to textarea_ds2.go: TotalDisplayLines, ResetCurrentVariable, LineMetaAt, YOffset, VisualRowToLogical, blinkTick (plus blinkTickMsg/blinkTickInterval), and the four line-number-gutter StyleState methods. textarea.go's function set now matches upstream bubbles v2.2.0's textarea.go by name, with one exception: insertRunes, which corresponds to upstream's insertRunesFromUserInput but has DS2's .env line classification spliced into its body -- that one needs the classification logic extracted behind a hook before it can move, not a plain relocation (tracked separately). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reviewer's GuideRelocates all DS2-specific textarea helpers from the shared textarea.go into textarea_ds2.go so that textarea.go’s exported/public API and helper set match upstream bubbles’ textarea implementation, without changing behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step 1 of scoping the bubbles textarea/selection port and the
.env/YAML syntax-mode extraction discussed separately -- pure file reorganization, no behavior change.enveditor/textarea.goand upstreamcharm.land/bubbles/v2@v2.2.0'stextarea/textarea.go: 92 vs 95, with 81 shared names (DS2's fork is still structurally close to upstream).textarea_ds2.go, matching that file's own stated purpose (see its header comment):TotalDisplayLines,ResetCurrentVariable,LineMetaAt,YOffset,VisualRowToLogical,blinkTick(+blinkTickMsg/blinkTickInterval), and the four line-number-gutterStyleStatemethods.textarea.go's function set now matches upstream's by name with exactly one exception:insertRunes, corresponding to upstream'sinsertRunesFromUserInputbut with DS2's.envline-classification logic spliced into its body. That one needs the classification logic extracted behind a hook before it can move -- not a plain relocation, tracked as a separate follow-up.Test plan
go build ./...,GOOS=linux go build ./...,go vet ./...,go test ./...all passcommdiff of before/after function name sets against upstreamSummary by Sourcery
Enhancements:
textarea_ds2.goto align the base textarea implementation with upstream structure without changing behavior.