On Thu, 31 May 2001, John Cavan wrote:
Well... I've narrowed it down somewhat... the originator of the problem
is in /etc/bashrc. When the backspace key is set:
if [ -x /usr/bin/tput ]; then
if [ x`tput kbs` != x ];
stty erase `tput kbs`
elif [ -x /usr/bin/wc ]; then
if [ `tput kbs|wc -c ` -gt 0 ];
stty erase `tput kbs`
fi
fi
fi
It screws up the terminals in some form. Commented out, and all but
xterm work correctly, but with it in, all of them (including xterm) are
messed up.
It would appear that the problems lies within the ncurses package,
though vim can't be completely ruled out.
It is no problem that got introduced in vim-6.0. On my Mandrake 7.2
system, I tried 'stty erase `tput kbs` ; vim', which gives me the
same problem.
On both systems, 'less' is also affected, the backspace
key does not work if you want to search for some text.
Interestingly, 'stty erase `tput -Tlinux kbs`' fixes the problem
in the xterm, which could mean that the terminfo database is
incorrect.
'tput -Tlinux kbs' gives character \177, while 'tput -Txterm kbs'
gives \008 aka ^H.
Arnd