summaryrefslogtreecommitdiffstats
path: root/Lib/_pyrepl/commands.py
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2024-06-04 21:22:28 (GMT)
committerGitHub <noreply@github.com>2024-06-04 21:22:28 (GMT)
commit69b3e8ea569faabccd74036e3d0e5ec7c0c62a20 (patch)
treed6bd0afa6a57a2db29118908b2f359dbe9874c76 /Lib/_pyrepl/commands.py
parent4055577221f5f52af329e87f31d81bb8fb02c504 (diff)
downloadcpython-69b3e8ea569faabccd74036e3d0e5ec7c0c62a20.zip
cpython-69b3e8ea569faabccd74036e3d0e5ec7c0c62a20.tar.gz
cpython-69b3e8ea569faabccd74036e3d0e5ec7c0c62a20.tar.bz2
gh-119553: Fix console when pressing Ctrl-C within a multiline block (#120075)
Diffstat (limited to 'Lib/_pyrepl/commands.py')
-rw-r--r--Lib/_pyrepl/commands.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/_pyrepl/commands.py b/Lib/_pyrepl/commands.py
index e94e8c25..6bffed1 100644
--- a/Lib/_pyrepl/commands.py
+++ b/Lib/_pyrepl/commands.py
@@ -216,11 +216,13 @@ class interrupt(FinishCommand):
import signal
self.reader.console.finish()
+ self.reader.finish()
os.kill(os.getpid(), signal.SIGINT)
class ctrl_c(Command):
def do(self) -> None:
+ self.reader.console.finish()
self.reader.finish()
raise KeyboardInterrupt