1
0
forked from VimPlug/jedi

Fix an issue with choosing the right lines in get_line_code. Refs #948.

This commit is contained in:
Dave Halter
2017-09-09 18:10:53 +02:00
parent 46f306aa11
commit ef6a1ca10f
2 changed files with 4 additions and 1 deletions

View File

@@ -394,7 +394,7 @@ class BaseDefinition(object):
lines = parser_cache[self._evaluator.grammar._hashed][path].lines
line_nr = self._name.start_pos[0]
start_line_nr = line_nr - before
start_line_nr = max(line_nr - before, 0)
return ''.join(lines[start_line_nr:line_nr + after + 1])