Skip to content

Commit

Permalink
Fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlandon committed Aug 15, 2023
1 parent ac22261 commit 628e15a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/completion/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ func (c RawValues) FilterPrefix(prefix string, matchCase bool) RawValues {
return filtered
}

func (x RawValues) Len() int { return len(x) }
func (c RawValues) Len() int { return len(c) }

func (x RawValues) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
func (c RawValues) Swap(i, j int) { c[i], c[j] = c[j], c[i] }

func (x RawValues) Less(i, j int) bool {
return strings.ToLower(x[i].Value) < strings.ToLower(x[j].Display)
func (c RawValues) Less(i, j int) bool {
return strings.ToLower(c[i].Value) < strings.ToLower(c[j].Value)
}

0 comments on commit 628e15a

Please sign in to comment.