From 941e3c97ec47f1304267c0e0af738faca437edc7 Mon Sep 17 00:00:00 2001 From: abicky Date: Sun, 23 Feb 2020 22:24:27 +0900 Subject: [PATCH] Support Node.js 13.7.0 This commit fixes infinite loops Node.js 13.7.0 or later causes. The root cause is the change of the output format on sending the first TAB. For example, the output on sending a TAB at the end of a line "> Err" changed like below: * Node.js 13.6.0 or earlier ``` Error^[[1G^[[0J> Error^[[8G ``` * Node.js 13.7.0 or later ``` Error ``` --- nodejs-repl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs-repl.el b/nodejs-repl.el index b392c40..2ab0141 100644 --- a/nodejs-repl.el +++ b/nodejs-repl.el @@ -223,7 +223,7 @@ See also `comint-process-echoes'" (not (let ((last-line (process-get proc 'last-line))) (or (string-match-p nodejs-repl-prompt-re last-line) - (string= last-line string))))) + (string-prefix-p string last-line))))) (process-put proc 'running-p nil) (accept-process-output proc interval)))