Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlainEditor: make relayout lazy #134

Open
nicoburns opened this issue Oct 10, 2024 · 1 comment
Open

PlainEditor: make relayout lazy #134

nicoburns opened this issue Oct 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@nicoburns
Copy link
Contributor

Rather than eagerly rebuilding the layout when some change invalidates it we should consider setting a dirty flag and relayout lazily when we require an accurate layout.

This would allow multiple changes to be applied without rebuilding the layout multiple times.

@nicoburns nicoburns added the enhancement New feature or request label Oct 10, 2024
@xorgy
Copy link
Member

xorgy commented Oct 11, 2024

Sure, this is sort of happening right now, but it's not rigorous so there might be some unnecessary layout. Layout is dirty for Selection construction (both index and point) when the buffer contents or width change. If we move from transact w/ PlainEditorOp to individual methods, we will need to add more rigorous dirty tracking state to PlainEditor itself (it won't be localized to transact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants