Show More
@@ -37,10 +37,14 b' class IPythonPTCompleter(Completer):' | |||
|
37 | 37 | if not document.current_line.strip(): |
|
38 | 38 | return |
|
39 | 39 | |
|
40 | used, matches = self.ipy_completer.complete( | |
|
41 | line_buffer=document.current_line, | |
|
42 | cursor_pos=document.cursor_position_col | |
|
43 | ) | |
|
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(): | |
|
44 | used, matches = self.ipy_completer.complete( | |
|
45 | line_buffer=document.current_line, | |
|
46 | cursor_pos=document.cursor_position_col | |
|
47 | ) | |
|
44 | 48 | start_pos = -len(used) |
|
45 | 49 | for m in matches: |
|
46 | 50 | if not m: |
General Comments 0
You need to be logged in to leave comments.
Login now