Refactor so isWrapped isn't public writeable#5788
Open
PerBothner wants to merge 3 commits intoxtermjs:masterfrom
Open
Refactor so isWrapped isn't public writeable#5788PerBothner wants to merge 3 commits intoxtermjs:masterfrom
PerBothner wants to merge 3 commits intoxtermjs:masterfrom
Conversation
Instead to change isWrapped state use a Buffer.setWrapped method. This allows for potential flexibility in how BufferLine and line-wrapping are implemented.
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.
Having a publicly-writable
isWrappedproperty inBufferLinerestricts our implementation options for how wrapped lines are represented in aBuffer. For example, it conflicts with the proposal in #5673.To hide this implementation choice, this PR makes
isWrappedread-only, and adds aBuffer.setWrappedmethod (taking an absolute row number) for modifying theisWrappedstate. There is also an internal-onlyBufferLine.setWrappedmethod used to implementBuffer.setWrappedand in one other place.This gives greater flexibility in how BufferLine and line-wrapping are implemented.
This is likely to trivially conflict with PR #5785. If one of these is merged, I'll update the other one to fix any conflicts.