fix #6360 (repl enters pasted text even if no newline is present)