Skip to content

Fix rope rebuilding after clearing child nodes - #72

Open
yuefdev wants to merge 1 commit into
zyedidia:masterfrom
yuefdev:fix/rope-rebuild-kind
Open

yuefdev wants to merge 1 commit into
zyedidia:masterfrom
yuefdev:fix/rope-rebuild-kind

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown

Rebuild clears the child pointers but leaves the node marked as internal, so the next Value call panics. It also prevents adjust from splitting the rebuilt data into a balanced tree.

Mark the collected data as a leaf before adjusting it. The regression covers short and split ropes, including insertion and removal after rebuilding.

go test -race ./..., go vet ./... and formatting checks pass.

Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.com>
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