Skip to content

Change opt_color of a BufferLine without triggering a reshape / relayout #69

Open
@hecrj

Description

The main use case here is being able to reuse a Buffer both for layout and drawing. iced does not know the color of the text during layout.

Color doesn't really affect anything but drawing, right? It seems it'd make more sense to provide a list of color spans as an argument to draw? Or maybe we could change BufferLine::set_attrs_list to not trigger a reset if only the colors differ?

if attrs_list != self.attrs_list {
self.attrs_list = attrs_list;
self.reset();
true

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions