abicky / nodejs-repl.el

Run Node.js REPL and communicate with the process
190 stars 38 forks source link

Kill ring contents are sometimes prepended to region before being sent to repl #31

Closed shofetim closed 4 years ago

shofetim commented 4 years ago

Emacs: version: 26.2

Nodejs-repl Version: 20200114.1529 Commit: 8b9094826568485eb0c48d798ae0026cb6962b83

NodeJS: Version: 13.8.0

Steps to reproduce:

  1. Start nodejs-repl
  2. Type `console.log("Hello world") into the repl
  3. Mark the undefined that the repl returns and copy it to the kill ring (M-w)
  4. Open a file tmp.js and enter console.log("Hello World") mark it, and then call nodejs-repl-send-region

The kill ring contents are prepended to what is sent to the nodejs-repl:

> console.log("Hello World")
Hello World
undefined
> undefined.editor
// Entering editor mode (^D to finish, ^C to cancel)
console.log("Hello World");
undefined
Hello World
undefined
> 

Process nodejs finished
abicky commented 4 years ago

Thank you for your report! I've fixed the issue in https://github.com/abicky/nodejs-repl.el/pull/32 and released nodejs-repl.el 0.2.4.

shofetim commented 4 years ago

Thank you! I've tried it out and it works great!