pub struct HighlightsUpdate {
pub op: HighlightsOp,
pub refine: Vec<Vec<RefineSpan>>,
}Expand description
One op’s worth of published highlighting — foreground spans plus, optionally, intra-line diff refinement (DR.3, 2026-08-12).
Refinement rides the SAME update rather than a parallel channel,
and that is deliberate. The drain’s own comment states the rule for
diff signs: “deriving rather than carrying signs on a parallel
channel is what makes the tint impossible to desynchronise from the
text — an inline diff expansion shifts spans and signs by
construction, because there is only one thing being shifted.”
A second channel for refinement would reintroduce exactly that
hazard: a = expansion inserts lines, and two lists spliced by two
code paths can disagree. One update, one splice.
refine is empty for every producer that has none, which is all of
them except magit’s diff views.
Fields§
§op: HighlightsOpThe foreground-span change.
refine: Vec<Vec<RefineSpan>>Intra-line refinement, aligned line-for-line with op’s spans;
empty when the producer has none.
Trait Implementations§
Source§impl Clone for HighlightsUpdate
impl Clone for HighlightsUpdate
Source§fn clone(&self) -> HighlightsUpdate
fn clone(&self) -> HighlightsUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more