From cbc17ade54ac18edc057fb52eb0120329cc24c4d Mon Sep 17 00:00:00 2001 From: Jason Chu Date: Thu, 19 Jan 2017 05:31:07 +0000 Subject: Change return value of gather_candidates because str's aren't valid anymore See https://github.com/Shougo/deoplete.nvim/issues/421 and https://github.com/Shougo/deoplete.nvim/issues/419 --- rplugin/python3/deoplete/sources/beancount.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rplugin') diff --git a/rplugin/python3/deoplete/sources/beancount.py b/rplugin/python3/deoplete/sources/beancount.py index f595a54..c21c057 100644 --- a/rplugin/python3/deoplete/sources/beancount.py +++ b/rplugin/python3/deoplete/sources/beancount.py @@ -36,17 +36,17 @@ class Source(Base): def gather_candidates(self, context): if re.match(r'^\d{4}[/-]\d\d[/-]\d\d \w*$', context['input']): - return DIRECTIVES + return [{'word': x, 'kind': 'directive'} for x in DIRECTIVES] if not context['complete_str']: return [] first = context['complete_str'][0] if first == '#': - return ['#' + w for w in self._tags] + return [{'word': '#' + w, 'kind': 'tag'} for w in self._tags] elif first == '^': - return ['^' + w for w in self._links] + return [{'word': '^' + w, 'kind': 'link'} for w in self._links] elif first == '"': - return ['"{}"'.format(w) for w in self._payees] - return self._accounts + return [{'word': '"{}"'.format(w), 'kind': 'payee'} for w in self._payees] + return [{'word': x, 'kind': 'account'} for x in self._accounts] def __make_cache(self, context): accounts = set() -- cgit v1.2.3-2-gb3c3