feat: tiebreak config function (#1401)
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
This commit is contained in:
@@ -153,6 +153,25 @@ append(
|
||||
- "ascending"]]
|
||||
)
|
||||
|
||||
append(
|
||||
"tiebreak",
|
||||
function(current_entry, existing_entry, _)
|
||||
return #current_entry.ordinal < #existing_entry.ordinal
|
||||
end,
|
||||
[[
|
||||
A function that determines how to break a tie when two entries have
|
||||
the same score.
|
||||
Having a function that always returns false would keep the entries in
|
||||
the order they are found, so existing_entry before current_entry.
|
||||
Vice versa always returning true would place the current_entry
|
||||
before the existing_entry.
|
||||
|
||||
Signature: function(current_entry, existing_entry, prompt) -> boolean
|
||||
|
||||
Default: function that breaks the tie based on the length of the
|
||||
entry's ordinal]]
|
||||
)
|
||||
|
||||
append(
|
||||
"selection_strategy",
|
||||
"reset",
|
||||
|
||||
Reference in New Issue
Block a user