We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9bde0a5 + 4c253e6 commit bfda5a4Copy full SHA for bfda5a4
2 files changed
nodejs-repl.el
@@ -291,7 +291,8 @@ when receive the output string"
291
;; cf. https://www.ecma-international.org/ecma-262/#sec-ecmascript-language-expressions
292
(defun nodejs-repl--beginning-of-expression ()
293
(search-backward-regexp "[[:graph:]]" nil t)
294
- (forward-char)
+ (unless (eq (char-after) ?\;)
295
+ (forward-char))
296
(cond
297
;; Allow function
298
((and (eq (char-before) ?})
test/test.el
@@ -169,4 +169,10 @@
169
(insert "bob; [1,2,3] . map(function(number) { return number * 2 })")
170
(nodejs-repl--beginning-of-expression)
171
))
172
+ (expect 16
173
+ (with-temp-buffer
174
+ (js-mode)
175
+ (insert "bob; var foo = 1;")
176
+ (nodejs-repl--beginning-of-expression)
177
+ ))
178
)
0 commit comments