File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
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 ()
You can’t perform that action at this time.
0 commit comments