Skip to content

Commit

Permalink
Remove Empty lastline on copy (πŸ’€)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlauer-Hax committed Dec 8, 2024
1 parent 4cd2f6f commit 32ece78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ function websocket() {
}
}
if (keypress.key === 'v') {
const input = await paste();
let input = await paste();
if (input.endsWith('\n')) {
input = input.slice(0, -1);
}
Deno.writeTextFileSync("testinput.txt", input);
console.log('Copied clipboard to testinput.txt');
sendTestInput();
Expand Down

0 comments on commit 32ece78

Please sign in to comment.