diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-27 20:47:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-27 20:47:25 +0400 |
commit | 05bb6b5d6ccfc1846fc524f4f790fd057f1a7616 (patch) | |
tree | beecf6c49ef4dab98b2eecb5ce2fdeb1e2e4d414 /release/scripts/modules/console | |
parent | 35807b20be55d49261d5fd2d837b65eb543e5472 (diff) |
bugfix [#24419] Console Autocomplete Error [Patch to fix attached]
patch provided by Justin Dailey (dail) in report.
Diffstat (limited to 'release/scripts/modules/console')
-rw-r--r-- | release/scripts/modules/console/complete_calltip.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/modules/console/complete_calltip.py b/release/scripts/modules/console/complete_calltip.py index 87fac9f4c07..322b48d4f65 100644 --- a/release/scripts/modules/console/complete_calltip.py +++ b/release/scripts/modules/console/complete_calltip.py @@ -168,7 +168,10 @@ def complete(line, cursor, namespace): 'abs(number) -> number\\nReturn the absolute value of the argument.' """ matches = [] + word = '' + scrollback = '' match = RE_DEF_COMPLETE.search(line[:cursor]) + if match: word = match.group(1) func_word = match.group(2) @@ -176,7 +179,7 @@ def complete(line, cursor, namespace): func = eval(func_word, namespace) except Exception: func = None - scrollback = '' + if func: doc = get_doc(func) argspec = get_argspec(func, doc=doc) @@ -186,7 +189,5 @@ def complete(line, cursor, namespace): elif doc: scrollback += '\n' + doc scrollback = reduce_newlines(scrollback) - else: - word = '' - scrollback = '' + return matches, word, scrollback |