diff --git a/lib/V8/V8LineEditor.cpp b/lib/V8/V8LineEditor.cpp index e33dcc8c6a..5fad9e5f23 100644 --- a/lib/V8/V8LineEditor.cpp +++ b/lib/V8/V8LineEditor.cpp @@ -166,7 +166,7 @@ bool V8Completer::isComplete (std::string const& source, size_t lineno) { else if (state == SINGLE_COMMENT) { ++ptr; - if (ptr == end) { + if (ptr == end || *ptr == '\n') { state = NORMAL; --openComments; }