I am reliant on emacs (version 24.4.1 on Debian) term and ansi-term modes. They normally work just like xTerm for me, but when running an interactive program that has a prompt (like the node.js prompt, or the mongoDB prompt), deleting a character makes the entire prompt redraw inline.

For example, when I open the node app and type TEXT followed by a single backspace, I see

jim@achileus:~$ node > TEXT> TEX

and when I type LONGER STRING followed by 13 backspaces I see

jim@achileus:~$ node > LONGER STRING> LONGER STRIN> LONGER STRI> LONGER STR> LONGER ST> LONGER S> LONGER > LONGER> LONGE> LONG> LON> LO> L>

This error does not occur in emacs shell but I don't want to use it.

Any insight as to why this is happening, or any clues on how to fix it?

Thanks!