##// END OF EJS Templates
Backport PR #12305: Fix ipython#11508: check if line_buffer is None
Matthias Bussonnier -
Show More
@@ -1982,8 +1982,8 b' class IPCompleter(Completer):'
1982 # if text is either None or an empty string, rely on the line buffer
1982 # if text is either None or an empty string, rely on the line buffer
1983 if (not line_buffer) and full_text:
1983 if (not line_buffer) and full_text:
1984 line_buffer = full_text.split('\n')[cursor_line]
1984 line_buffer = full_text.split('\n')[cursor_line]
1985 if not text:
1985 if not text: # issue #11508: check line_buffer before calling split_line
1986 text = self.splitter.split_line(line_buffer, cursor_pos)
1986 text = self.splitter.split_line(line_buffer, cursor_pos) if line_buffer else ''
1987
1987
1988 if self.backslash_combining_completions:
1988 if self.backslash_combining_completions:
1989 # allow deactivation of these on windows.
1989 # allow deactivation of these on windows.
General Comments 0
You need to be logged in to leave comments. Login now