Skip to content

Commit 4b760b6

Browse files
author
Paul Sokolovsky
committed
webrepl.html: Fix issue with pasting multi-line text.
1 parent 74d7253 commit 4b760b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webrepl.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
ws.onopen = function() {
8989
term.removeAllListeners('data');
9090
term.on('data', function(data) {
91+
// Pasted data from clipboard will likely contain
92+
// LF as EOL chars.
93+
data = data.replace(/\n/g, "\r");
9194
ws.send(data);
9295
});
9396

0 commit comments

Comments
 (0)