Remove the last '\n' when copying from an output view
There's no need for this one and it makes it more convenient in some cases,
for example if 1 line is copied into a console it won't trigger the line
automatically
(cherry picked from commit 8d4fc76a89e152974fefd1db1539d9e7049b760a)