Skip to content

Commit

Permalink
TkTerminal: stop it from eating a line when a prefilter is needed to …
Browse files Browse the repository at this point in the history
…make the input valid
  • Loading branch information
NathanDunfield committed Dec 30, 2024
1 parent 3000d81 commit 115e95f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tkterminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ def interact_handle_input(self, cell, script=False):
prompt and set the 'more' flag. If the code is valid and
complete then run the code.
"""
transformer = self.IP.input_transformer_manager
assert cell.endswith('\n')
if not cell.strip():
self._current_indent = 0
Expand All @@ -787,7 +786,8 @@ def interact_handle_input(self, cell, script=False):
self._input_buffer += cell
else:
self._input_buffer = self.clean_code(cell)
status, indent = transformer.check_complete(self._input_buffer)
transformed_cell = self.IP.transform_cell(self._input_buffer)
status, indent = self.IP.check_complete(transformed_cell)
self._current_indent = indent or 0
if status == 'incomplete':
self.IP.more = True
Expand Down

0 comments on commit 115e95f

Please sign in to comment.