Fix corruption in minibuffer on a TTY