Don't wrap lines when printing. This can mess up selection mechanisms in terminals / tmux. Instead, use \n or hard reposition the cursor when lines change.
\n