Skip to content
Myr

result_others.go

This file

Path

src/result_others.go

20 lines · 490 bytes · Go

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 7a811f0 point at it.

Fix --no-sort jumpiness by merging results in index orderJunegunn Choibefore adoption7a811f0

lines 1–20why, one step back
1//go:build !386 && !amd64 && !arm64
23package fzf45func compareRanks(irank Result, jrank Result, tac bool) bool {6 for idx := 3; idx >= 0; idx-- {7 left := irank.points[idx]8 right := jrank.points[idx]9 if left < right {10 return true11 } else if left > right {12 return false13 }14 }15 return (irank.item.Index() <= jrank.item.Index()) != tac16}1718func sortKey(r *Result) uint64 {19 return uint64(r.points[0]) | uint64(r.points[1])<<16 | uint64(r.points[2])<<32 | uint64(r.points[3])<<4820}