Fix colon prefix problems

- When copying text box contents to buffer command, remove leading colon prefix
- Switch out of command line edit mode before processing enter to prevent colon from being re-added to the subsequent status message

I think more test infrastructure is needed to test command line edit mode.

Manual repro for both problems:

- :pwd<Left><Enter>
- Problem 2: Status now has ':' prefix
- :<Up>
- Problem 1: Command now has double '::' prefix

Fixes #1249.