Dont use splitlines() to replace \n with \r in pasted text
splitlines breaks on a whole bunch of characters besides \r and \n.
This commit is contained in:
parent
9007623d0c
commit
18751a05c0
1 changed files with 1 additions and 1 deletions
|
|
@ -572,7 +572,7 @@ def paste(self, text):
|
|||
else:
|
||||
# Workaround for broken editors like nano that cannot handle
|
||||
# newlines in pasted text see https://github.com/kovidgoyal/kitty/issues/994
|
||||
text = b'\r'.join(text.splitlines())
|
||||
text = text.replace(b'\r\n', b'\n').replace(b'\n', b'\r')
|
||||
self.screen.paste(text)
|
||||
|
||||
def copy_to_clipboard(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue