Merge pull request #312 from genzj/issue-#311

Fix upstream #311
This commit is contained in:
Dave Halter
2014-10-14 13:28:56 +02:00

View File

@@ -131,7 +131,7 @@ def completions():
abbr=PythonToVimStr(c.name),
# stuff directly behind the completion
menu=PythonToVimStr(c.description),
info=PythonToVimStr(c.doc), # docstr
info=PythonToVimStr(c.docstring()), # docstr
icase=1, # case insensitive
dup=1 # allow duplicates (maybe later remove this)
)
@@ -219,8 +219,8 @@ def show_documentation():
echo_highlight('No documentation found for that.')
vim.command('return')
else:
docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '=' * 40, d.doc)
if d.doc else '|No Docstring for %s|' % d for d in definitions]
docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '=' * 40, d.docstring())
if d.docstring() else '|No Docstring for %s|' % d for d in definitions]
text = ('\n' + '-' * 79 + '\n').join(docs)
vim.command('let l:doc = %s' % repr(PythonToVimStr(text)))
vim.command('let l:doc_lines = %s' % len(text.split('\n')))
@@ -268,7 +268,7 @@ def show_call_signatures(signatures=()):
# TODO check if completion menu is above or below
line = vim_eval("getline(%s)" % line_to_replace)
params = [p.get_code().replace('\n', '') for p in signature.params]
params = [p.description.replace('\n', '') for p in signature.params]
try:
params[signature.index] = '*%s*' % params[signature.index]
except (IndexError, TypeError):