Skip to content

Commit 32ece78

Browse files
committed
Remove Empty lastline on copy (💀)
1 parent 4cd2f6f commit 32ece78

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎helper/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ function websocket() {
4949
}
5050
}
5151
if (keypress.key === 'v') {
52-
const input = await paste();
52+
let input = await paste();
53+
if (input.endsWith('\n')) {
54+
input = input.slice(0, -1);
55+
}
5356
Deno.writeTextFileSync("testinput.txt", input);
5457
console.log('Copied clipboard to testinput.txt');
5558
sendTestInput();

0 commit comments

Comments
 (0)