Skip to content

Fix: restore SplitPane gutter position preservation#785

Merged
MrCoder merged 1 commit intomasterfrom
fix/splitpane-preserve-gutter-position
Dec 30, 2025
Merged

Fix: restore SplitPane gutter position preservation#785
MrCoder merged 1 commit intomasterfrom
fix/splitpane-preserve-gutter-position

Conversation

@MrCoder
Copy link
Contributor

@MrCoder MrCoder commented Dec 30, 2025

Problem

During the merge conflict resolution in PR #784, commit 1923579 was accidentally reverted. This caused the split gutter position to reset on every code change.

Root Cause

The merge took master's componentWillUpdate() approach which destroys the split on every update, then I added componentDidUpdate() to recreate it. But this missed the prevProps.direction check from the original commit.

Fix

  • Remove componentWillUpdate() that destroyed split on every update
  • Use componentDidUpdate(prevProps) with direction check
  • Only rebuild split when direction prop actually changes
  • This preserves the gutter position when code changes

Testing

  1. Open the app and drag the splitter to a custom position
  2. Make code changes in the editor
  3. Verify the gutter position is preserved (not reset)

Restore the original behavior from commit 1923579 that was accidentally
reverted during merge conflict resolution.

- Remove componentWillUpdate that destroyed split on every update
- Use componentDidUpdate with prevProps.direction check
- Only rebuild split when direction actually changes
- This preserves the gutter position when code changes
@cursor
Copy link

cursor bot commented Dec 30, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 17.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@MrCoder MrCoder merged commit 6886ee5 into master Dec 30, 2025
2 checks passed
@MrCoder MrCoder deleted the fix/splitpane-preserve-gutter-position branch December 30, 2025 11:06
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