Replace in Visual Mode no longer changes new line

Replace in visual mode was incorrectly replacing the new line character
if the selection crossed into the new line.

close #1201