diff --git a/jedi_vim.py b/jedi_vim.py index 9a73081..9cc4a90 100644 --- a/jedi_vim.py +++ b/jedi_vim.py @@ -213,6 +213,7 @@ def show_documentation(): print(traceback.format_exc()) if not definitions: + 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 diff --git a/test/documentation.vim b/test/documentation.vim index 9dfbce6..86fc8c4 100644 --- a/test/documentation.vim +++ b/test/documentation.vim @@ -1,10 +1,15 @@ source plugin/jedi.vim -describe 'documentation_docstrings' +describe 'documentation docstrings' before set filetype=python end + after + bd! + bd! + end + it 'simple' put = 'ImportError' normal GK @@ -15,6 +20,12 @@ describe 'documentation_docstrings' normal K Expect bufname('%') == '' end + + it 'no documentation' + put = 'x = 2' + normal G0K + Expect bufname('%') == '' + end end " vim: et:ts=4:sw=4 diff --git a/test/goto.vim b/test/goto.vim index 6ee953e..45acd81 100644 --- a/test/goto.vim +++ b/test/goto.vim @@ -23,7 +23,7 @@ describe 'goto_simple' it 'goto_definitions' silent normal \d Expect line('.') == 1 - "Expect col('.') == 5 + "Expect col('.') == 5 " not working yet. end it 'goto_assignments'