Skip to content

fix(edit-buffer): extract ranges using configured width method - #1295

Open
simonklee wants to merge 1 commit into
mainfrom
issue-1287/work
Open

fix(edit-buffer): extract ranges using configured width method#1295
simonklee wants to merge 1 commit into
mainfrom
issue-1287/work

Conversation

@simonklee

@simonklee simonklee commented Jul 28, 2026

Copy link
Copy Markdown
Member

getTextRange always measured with Unicode rules, so wcwidth text
past 65535 columns and ranges starting inside a grapheme returned
the wrong bytes.

Honor the configured width method while preserving grapheme
snapping, stop traversal at the range end, avoid copying exact-sized
FFI output buffers, and widen rope balance math so large weights do
not wrap.

Fixes #1287

@simonklee simonklee self-assigned this Jul 28, 2026
@simonklee simonklee changed the title issue 1287/work fix(edit-buffer): extract ranges using configured width method Jul 28, 2026
EditBuffer text and range APIs used fixed 1 MiB output buffers, silently truncating larger content. Size outputs from native text data and widen chunk widths so long lines remain readable.

Honor configured width methods while preserving grapheme snapping, stop range traversal at the end offset, avoid redundant exact-size FFI copies, and widen rope balance math for large weights.

Fixes #1287
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.

bug(core): EditBuffer.getText()/getTextRange() silently truncate at 1 MiB with no way to detect it

1 participant