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
@ -572,7 +572,7 @@ class Window:
|
||||
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…
x
Reference in New Issue
Block a user