##// END OF EJS Templates
give PTCompleter InteractiveShell, not Completer...
Min RK -
Show More
@@ -238,7 +238,7 b' class TerminalInteractiveShell(InteractiveShell):'
238 editing_mode=editing_mode,
238 editing_mode=editing_mode,
239 key_bindings_registry=kbmanager.registry,
239 key_bindings_registry=kbmanager.registry,
240 history=history,
240 history=history,
241 completer=IPythonPTCompleter(self.Completer),
241 completer=IPythonPTCompleter(self),
242 enable_history_search=True,
242 enable_history_search=True,
243 style=style,
243 style=style,
244 mouse_support=self.mouse_support,
244 mouse_support=self.mouse_support,
@@ -12,8 +12,12 b' import pygments.lexers as pygments_lexers'
12
12
13 class IPythonPTCompleter(Completer):
13 class IPythonPTCompleter(Completer):
14 """Adaptor to provide IPython completions to prompt_toolkit"""
14 """Adaptor to provide IPython completions to prompt_toolkit"""
15 def __init__(self, ipy_completer):
15 def __init__(self, shell):
16 self.ipy_completer = ipy_completer
16 self.shell = shell
17
18 @property
19 def ipy_completer(self):
20 return self.shell.Completer
17
21
18 def get_completions(self, document, complete_event):
22 def get_completions(self, document, complete_event):
19 if not document.current_line.strip():
23 if not document.current_line.strip():
General Comments 0
You need to be logged in to leave comments. Login now