I also have this problem on an older Mac, which I upgraded to Lion.
Before reading the terminfo tip, I was able to get vi and work less by doing "export TERM = xterm".
After reading the hint, I grabbed /usr/share/terminfo from a newer Mac that has a new Lion installation and does not detect this problem.
Now, although echo $TERM still gives xterm-256color , now vi and less are working fine.
bitaxis Jul 24 '11 at 16:39 2011-07-24 16:39
source share