1
0
forked from VimPlug/jedi

Keyword completions are no longer possible directly after a number, fixes #1085

This commit is contained in:
Dave Halter
2019-06-26 15:04:46 +02:00
parent 265abe1d08
commit fafd6b2ac6
5 changed files with 32 additions and 8 deletions

View File

@@ -171,7 +171,10 @@ class Completion:
elif type_ == 'for_stmt':
allowed_transitions.append('else')
completion_names = list(self._get_keyword_completion_names(allowed_transitions))
completion_names = []
current_line = self._code_lines[self._position[0] - 1][:self._position[1]]
if not current_line or current_line[-1] in ' \t.;':
completion_names += self._get_keyword_completion_names(allowed_transitions)
if any(t in allowed_transitions for t in (PythonTokenTypes.NAME,
PythonTokenTypes.INDENT)):