diff --git a/README.mdown b/README.mdown index 887fd196..8fe7b711 100644 --- a/README.mdown +++ b/README.mdown @@ -133,6 +133,10 @@ have the following objects available: > imports and doesn't break there. You probably don't want to use this > function. It's mostly for testing. +`NotFoundError` +> If you use the goto function and no valid identifier (name) is at the +> place of the cursor (position). It will raise this exception. + `set_debug_function` > Sets a callback function for `debug.py`. This function is called with > multiple text objects, in python 3 you could insert `print`. diff --git a/functions.py b/functions.py index d6a034b9..25e31eb3 100644 --- a/functions.py +++ b/functions.py @@ -9,7 +9,6 @@ import debug import imports import os -# TODO remove NotFoundError, should not be exposed __all__ = ['complete', 'goto', 'get_definitions', 'NotFoundError', 'set_debug_function'] diff --git a/plugin/jedi.vim b/plugin/jedi.vim index 3fa8c3d2..949d78bb 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -88,7 +88,7 @@ if 1: try: definitions = functions.goto(source, row, column, buf_path) except functions.NotFoundError: - echo_highlight("Couldn't find a place to goto.") + echo_highlight("Cannot follow nothing. Put your cursor on a valid name.") except Exception: # print to stdout, will be in :messages echo_highlight("Some different eror, this shouldn't happen.")