diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-09-04 09:49:10 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-09-04 09:49:10 -0400 |
| commit | 14310ee6b1f40425ba854d6ddc6374960fdf81ca (patch) | |
| tree | c6ea9c7a2acb62f853e91b4d1544b899a8af9f3e /lua/telescope/sorters.lua | |
| parent | 996f69465ed51856aa18093d88795fae2b8565f4 (diff) | |
fix: Don't push past midnight. You'll make clason's stuff break :/
Diffstat (limited to 'lua/telescope/sorters.lua')
| -rw-r--r-- | lua/telescope/sorters.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/telescope/sorters.lua b/lua/telescope/sorters.lua index e2a7639..474bdff 100644 --- a/lua/telescope/sorters.lua +++ b/lua/telescope/sorters.lua @@ -26,7 +26,7 @@ end function Sorter:score(prompt, entry) -- TODO: Decide if we actually want to check the type every time. - return self:scoring_function(prompt, type(entry) == "string" and entry or entry.ordinal) + return self:scoring_function(prompt, type(entry) == "string" and entry or entry.ordinal, entry) end function sorters.new(...) @@ -232,7 +232,11 @@ sorters.get_norcalli_sorter = function() end return Sorter:new { - scoring_function = function(_, prompt, line) + -- self + -- prompt (which is the text on the line) + -- line (entry.ordinal) + -- entry (the whole entry) + scoring_function = function(_, prompt, line, _) if prompt == 0 or #prompt < ngramlen then return 0 end |
