mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix: deal with the pattern when score is -1 (#193)
* fix: deal with the pattern when score is -1 * docs: fix the default value in README
This commit is contained in:
parent
42b6421061
commit
62534e2479
@ -275,7 +275,9 @@ See [default configuration](https://github.com/nvim-telescope/telescope.nvim#tel
|
||||
---@param fzy_score number
|
||||
---@return number
|
||||
scoring_function = function(recency, fzy_score)
|
||||
return (10 / (recency == 0 and 1 or recency)) - 1 / fzy_score
|
||||
local score = (10 / (recency == 0 and 1 or recency)) - 1 / fzy_score
|
||||
-- HACK: -1 means FILTERED, so return a bit smaller one.
|
||||
return score == -1 and -1.000001 or score
|
||||
end,
|
||||
```
|
||||
|
||||
|
||||
@ -51,7 +51,9 @@ Config.new = function()
|
||||
---@param fzy_score number
|
||||
---@return number
|
||||
scoring_function = function(recency, fzy_score)
|
||||
return (10 / (recency == 0 and 1 or recency)) - 1 / fzy_score
|
||||
local score = (10 / (recency == 0 and 1 or recency)) - 1 / fzy_score
|
||||
-- HACK: -1 means FILTERED, so return a bit smaller one.
|
||||
return score == -1 and -1.000001 or score
|
||||
end,
|
||||
show_filter_column = true,
|
||||
show_scores = false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user