This commit is contained in:
Kovid Goyal 2018-06-08 17:53:08 +05:30
commit 59ab22c0c8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -431,7 +431,11 @@ class Window:
if isinstance(text, str):
text = text.encode('utf-8')
if self.screen.in_bracketed_paste_mode:
text = text.replace(b'\033[201~', b'').replace(b'\x9b201~', b'')
while True:
new_text = text.replace(b'\033[201~', b'').replace(b'\x9b201~', b'')
if text == new_text:
break
text = new_text
self.screen.paste(text)
def copy_to_clipboard(self):