Show More
@@ -39,10 +39,14 b' class IPythonPTCompleter(Completer):' | |||
|
39 | 39 | if not document.current_line.strip(): |
|
40 | 40 | return |
|
41 | 41 | |
|
42 | used, matches = self.ipy_completer.complete( | |
|
43 | line_buffer=document.current_line, | |
|
44 | cursor_pos=document.cursor_position_col | |
|
45 | ) | |
|
42 | # Some bits of our completion system may print stuff (e.g. if a module | |
|
43 | # is imported). This context manager ensures that doesn't interfere with | |
|
44 | # the prompt. | |
|
45 | with self.shell.pt_cli.patch_stdout_context(): | |
|
46 | used, matches = self.ipy_completer.complete( | |
|
47 | line_buffer=document.current_line, | |
|
48 | cursor_pos=document.cursor_position_col | |
|
49 | ) | |
|
46 | 50 | start_pos = -len(used) |
|
47 | 51 | for m in matches: |
|
48 | 52 | if not m: |
General Comments 0
You need to be logged in to leave comments.
Login now