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.
Here's a sketch on how far i got into trying to make (at least) word-wrap a thing. Since it's just word-wrap, it won't deal with very long single- word lines still. (Should the layout module be able to split spans?).
This still doesn't solve the problem if the Editor (src/screen/mod.rs) not being aware of wrapped lines.
I think either we'll have to:
Feed data from the Layout back to the Editor. How tall is each Item? Is there a way to scroll the screen without recomputing from the top? Maybe keep an Item as anchor: "We are 7 lines down from Item 42"
Do wrapping separately from (or with the help of?) the Layout module. Keep each Item = 1 line. When the internal model is constructed, split long lines into multiple items. Make them behave as if 1 when selecting etc.