From 30c8be06163ecd5667d6d67670b6948b3d651865 Mon Sep 17 00:00:00 2001 From: Chris Lasher Date: Sat, 10 Oct 2020 20:48:48 -0700 Subject: [PATCH] Set match limit to 1000 Constraining the match limit to winheight provides the user too few matches. Raising the limit to 1,000 makes the plugin behavior consistent with other filters, e.g., cpsm: https://github.com/Shougo/denite.nvim/blob/7d54f44e1035aea4cba99bdb34f0565b55008706/rplugin/python3/denite/filter/matcher/cpsm.py#L65 --- rplugin/python3/denite/filter/matcher/fruzzymatcher.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rplugin/python3/denite/filter/matcher/fruzzymatcher.py b/rplugin/python3/denite/filter/matcher/fruzzymatcher.py index 701c326..d938af1 100644 --- a/rplugin/python3/denite/filter/matcher/fruzzymatcher.py +++ b/rplugin/python3/denite/filter/matcher/fruzzymatcher.py @@ -15,6 +15,10 @@ import fruzzy + +LIMIT = 1000 + + class Filter(Base): def __init__(self, vim): @@ -53,13 +57,11 @@ def filter(self, context): # self.debug("context: %s" % context) ispath = candidates and 'action__path' in candidates[0] # self.debug("candidates %s %s" % (qry, len(candidates))) - limit = context['winheight'] - limit = int(limit) if isinstance(limit, str) else limit buffer = context['bufnr'] buffer = int(buffer) if isinstance(buffer, str) else buffer sortOnEmptyQuery = self.vim.vars.get("fruzzy#sortonempty", 1) results = self.scoreMatchesProxy(qry, candidates, - limit, + LIMIT, key=lambda x: x['word'], ispath=ispath, buffer=buffer,