##// END OF EJS Templates
Use prompt_toolkit's patch_stdout_context when finding completions...
Thomas Kluyver -
Show More
@@ -37,6 +37,10 b' class IPythonPTCompleter(Completer):'
37 if not document.current_line.strip():
37 if not document.current_line.strip():
38 return
38 return
39
39
40 # Some bits of our completion system may print stuff (e.g. if a module
41 # is imported). This context manager ensures that doesn't interfere with
42 # the prompt.
43 with self.shell.pt_cli.patch_stdout_context():
40 used, matches = self.ipy_completer.complete(
44 used, matches = self.ipy_completer.complete(
41 line_buffer=document.current_line,
45 line_buffer=document.current_line,
42 cursor_pos=document.cursor_position_col
46 cursor_pos=document.cursor_position_col
General Comments 0
You need to be logged in to leave comments. Login now