forked from VimPlug/jedi-vim
show a no documentation warning, fixes #164
This commit is contained in:
@@ -213,6 +213,7 @@ def show_documentation():
|
|||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
|
||||||
if not definitions:
|
if not definitions:
|
||||||
|
echo_highlight('No documentation found for that.')
|
||||||
vim.command('return')
|
vim.command('return')
|
||||||
else:
|
else:
|
||||||
docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '='*40, d.doc) if d.doc
|
docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '='*40, d.doc) if d.doc
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
source plugin/jedi.vim
|
source plugin/jedi.vim
|
||||||
|
|
||||||
describe 'documentation_docstrings'
|
describe 'documentation docstrings'
|
||||||
before
|
before
|
||||||
set filetype=python
|
set filetype=python
|
||||||
end
|
end
|
||||||
|
|
||||||
|
after
|
||||||
|
bd!
|
||||||
|
bd!
|
||||||
|
end
|
||||||
|
|
||||||
it 'simple'
|
it 'simple'
|
||||||
put = 'ImportError'
|
put = 'ImportError'
|
||||||
normal GK
|
normal GK
|
||||||
@@ -15,6 +20,12 @@ describe 'documentation_docstrings'
|
|||||||
normal K
|
normal K
|
||||||
Expect bufname('%') == ''
|
Expect bufname('%') == ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'no documentation'
|
||||||
|
put = 'x = 2'
|
||||||
|
normal G0K
|
||||||
|
Expect bufname('%') == ''
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
" vim: et:ts=4:sw=4
|
" vim: et:ts=4:sw=4
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ describe 'goto_simple'
|
|||||||
it 'goto_definitions'
|
it 'goto_definitions'
|
||||||
silent normal \d
|
silent normal \d
|
||||||
Expect line('.') == 1
|
Expect line('.') == 1
|
||||||
"Expect col('.') == 5
|
"Expect col('.') == 5 " not working yet.
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'goto_assignments'
|
it 'goto_assignments'
|
||||||
|
|||||||
Reference in New Issue
Block a user