Well, I can only suggest a few ideas for exploration, that may lead to some useful information. Try
and post the results here. With luck, someone will recognize the problem that is affecting you.
Try the same, and compare against a version that does work. What is the value of $TERM? Does it match the type of terminal actually in use? Does your problem occur on all lines of the terminal, or only on the last line?
The best source of information on this somewhat complex subject that I know of is the Text-Terminal-HOWTO
. The section on 'Terminfo and Termcap' may be particularly helpful in your case.