<reponame>StephGit/dotfiles
# ============================================================================
# FILE: matcher_length.py
# AUTHOR: <NAME> <Shougo.Matsu at g<EMAIL>.<EMAIL>>
# License: MIT license
# ============================================================================

from .base import Base


class Filter(Base):

    def __init__(self, vim):
        Base.__init__(self, vim)

        self.name = 'matcher_length'
        self.description = 'length matcher'

    def filter(self, context):
        input_len = len(context['complete_str'])
        return [x for x in context['candidates']
                if len(x['word']) > input_len]
