Pulled the code that determines what text to send into a separate function to allow sending arbitrary text to the REPL.
Always adds an extra newline to visual selections sent to the REPL.