diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2024-05-07 12:54:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 12:54:56 (GMT) |
commit | 7d90b8aadbd6993ee50a73b7536f769334718423 (patch) | |
tree | c52e6f2f5f03a3e2a6b4f57a5b2a0e321c72000a /Lib/_pyrepl/commands.py | |
parent | ad3d877a126bc892d1c598cf1357a2c39fd466c7 (diff) | |
download | cpython-7d90b8aadbd6993ee50a73b7536f769334718423.zip cpython-7d90b8aadbd6993ee50a73b7536f769334718423.tar.gz cpython-7d90b8aadbd6993ee50a73b7536f769334718423.tar.bz2 |
gh-111201: Allow bracketed paste to work (GH-118700)
Diffstat (limited to 'Lib/_pyrepl/commands.py')
-rw-r--r-- | Lib/_pyrepl/commands.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/_pyrepl/commands.py b/Lib/_pyrepl/commands.py index 60ceb30..bb6bebac 100644 --- a/Lib/_pyrepl/commands.py +++ b/Lib/_pyrepl/commands.py @@ -462,3 +462,13 @@ class paste_mode(Command): def do(self) -> None: self.reader.paste_mode = not self.reader.paste_mode self.reader.dirty = True + + +class enable_bracketed_paste(Command): + def do(self) -> None: + self.reader.paste_mode = True + +class disable_bracketed_paste(Command): + def do(self) -> None: + self.reader.paste_mode = False + self.reader.insert("\n") |