Skip to content

Commit d0b4e56

Browse files
committed
Merge branch 'release/0.1.7'
2 parents 1677065 + 4b0f855 commit d0b4e56

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

nodejs-repl.el

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Copyright (C) 2012-2017 Takeshi Arabiki
44

55
;; Author: Takeshi Arabiki
6-
;; Version: 0.1.6
6+
;; Version: 0.1.7
77

88
;; This program is free software: you can redistribute it and/or modify
99
;; it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@
5353
"Run Node.js REPL and communicate the process."
5454
:group 'processes)
5555

56-
(defconst nodejs-repl-version "0.1.6"
56+
(defconst nodejs-repl-version "0.1.7"
5757
"Node.js mode Version.")
5858

5959
(defcustom nodejs-repl-command "node"
@@ -374,8 +374,13 @@ when receive the output string"
374374
"Send the current region to the `nodejs-repl-process'"
375375
(interactive "r")
376376
(let ((proc (nodejs-repl--get-or-create-process)))
377+
;; Enclose the region in .editor ... EOF as this is more robust.
378+
;; See: https://github.com/abicky/nodejs-repl.el/issues/17
379+
(comint-send-string proc ".editor\n")
377380
(comint-send-region proc start end)
378-
(comint-send-string proc "\n")))
381+
(comint-send-string proc "\n")
382+
(with-current-buffer (process-buffer proc)
383+
(comint-send-eof))))
379384

380385
;;;###autoload
381386
(defun nodejs-repl-send-buffer ()

0 commit comments

Comments
 (0)