@@ -228,10 +228,6 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
|
228 | 228 | self.indentwidth = self.tabwidth |
229 | 229 | self.set_notabs_indentwidth() |
230 | 230 | |
231 | | -# If context_use_ps1 is true, parsing searches back for a ps1 line; |
232 | | -# else searches for a popular (if, def, ...) Python stmt. |
233 | | -self.context_use_ps1 = False |
234 | | - |
235 | 231 | # When searching backwards for a reliable place to begin parsing, |
236 | 232 | # first start num_context_lines[0] lines back, then |
237 | 233 | # num_context_lines[1] lines back if that didn't work, and so on. |
@@ -1337,14 +1333,13 @@ def newline_and_indent_event(self, event):
|
1337 | 1333 | # open/close first need to find the last stmt |
1338 | 1334 | lno = index2line(text.index('insert')) |
1339 | 1335 | y = pyparse.Parser(self.indentwidth, self.tabwidth) |
1340 | | -if not self.context_use_ps1: |
| 1336 | +if not self.prompt_last_line: |
1341 | 1337 | for context in self.num_context_lines: |
1342 | 1338 | startat = max(lno - context, 1) |
1343 | 1339 | startatindex = repr(startat) + ".0" |
1344 | 1340 | rawtext = text.get(startatindex, "insert") |
1345 | 1341 | y.set_code(rawtext) |
1346 | 1342 | bod = y.find_good_parse_start( |
1347 | | -self.context_use_ps1, |
1348 | 1343 | self._build_char_in_string_func(startatindex)) |
1349 | 1344 | if bod is not None or startat == 1: |
1350 | 1345 | break |
|