Skip to main content

points

Function points 

Source
pub fn points(
    item: &str,
    key: &str,
    b: &Bounds,
    criteria: &[Criterion],
) -> [u16; 4]
Expand description

fzf’s buildResultFromBounds (result.go:54): pack the criteria into four u16 slots, best-first, so ordering is one integer comparison per pair.

The slots fill from the END (points[3 - idx]), which is what makes the packed comparison in compare_points read criteria in declaration order. item is the WHOLE line and key is what the query matched against — the two differ under --nth. fzf measures length on the item (item.TrimLength, result.go:81) while the match offsets are relative to the matched token, so each criterion has to be told which of the two it is about.