Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Lib/_pyrepl/simple_interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,15 @@ def more_lines(unicodetext: str) -> bool:
assert not more
input_n += 1
except KeyboardInterrupt:
console.write("KeyboardInterrupt\n")
r = _get_reader()
if r.last_command and 'isearch' in r.last_command.__name__:
r.isearch_direction = ''
r.console.forgetinput()
r.pop_input_trans()
r.dirty = True
r.refresh()
r.in_bracketed_paste = False
console.write("\nKeyboardInterrupt\n")
console.resetbuffer()
except MemoryError:
console.write("\nMemoryError\n")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix PyREPL console getting into a blocked state after interrupting a long
paste
Comment on lines +1 to +2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny wording nitpick:

Suggested change
Fix PyREPL console getting into a blocked state after interrupting a long
paste
Fixed REPL getting into a blocked state after interruption of
paste.