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

Extract color overrides from attrs_list into new color_spans field #101

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

geieredgar
Copy link
Contributor

@geieredgar geieredgar commented Mar 6, 2023

This is a follow up for #100. It removes the color_opt field from Attrs and stores the information in the new color_spans field of BufferLine instead. This allows it to be mutated without having to do relayouts.

Fixes #69.

@geieredgar geieredgar force-pushed the draw-attrs branch 2 times, most recently from 849f891 to 1fd65e6 Compare March 12, 2023 09:38
@geieredgar geieredgar marked this pull request as draft March 12, 2023 10:56
@genusistimelord
Copy link
Contributor

this looks very promising, However You probably should move Metadata in with the Color as these are ones that don't affect the Layout.

@genusistimelord
Copy link
Contributor

genusistimelord commented Mar 30, 2023

Might also be Worth it to allow the End user to get a Mutable Span if one Already Existed so they can update it rather than replace it.
what do you think @jackpot51 ?

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.

Change opt_color of a BufferLine without triggering a reshape / relayout
2 participants