avoid problems if doc is opened

This commit is contained in:
David Halter committed 2012-10-14 12:24:05 +02:00
1 parent be595d326d
commit d885557d66
1 file changed
+2 -2
+2 -2
View File
@@ -27,8 +27,8 @@ def echo_highlight(msg):
def get_script(source=None, column=None):
jedi.settings.additional_dynamic_modules = \
[b.name for b in vim.buffers if b.name.endswith('.py')]
jedi.settings.additional_dynamic_modules = [b.name for b in vim.buffers
if b.name is not None and b.name.endswith('.py')]
if source is None:
source = '\n'.join(vim.current.buffer)
row = vim.current.window.cursor[0]