mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.matcher): fix cwd_bonus check
This commit is contained in:
parent
1d99bac9bc
commit
00af290906
1 changed files with 3 additions and 1 deletions
|
@ -321,7 +321,9 @@ function M:update(item)
|
|||
item.frecency = item.frecency or self.frecency:get(item)
|
||||
score = score + (1 - 1 / (1 + item.frecency)) * BONUS_FRECENCY
|
||||
end
|
||||
if self.opts.cwd_bonus and self.cwd == item.cwd or Snacks.picker.util.path(item):find(self.cwd, 1, true) == 1 then
|
||||
if
|
||||
self.opts.cwd_bonus and (self.cwd == item.cwd or Snacks.picker.util.path(item):find(self.cwd, 1, true) == 1)
|
||||
then
|
||||
score = score + BONUS_CWD
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue