This looks more like a problem with terminal or TERM variable. What is your TERM setting? Do you have a custom terminfo?