The termcap entry for screen is old and does not have end key. Fix: Use the termcap entry that comes with screen. Here is a patch for version 1.132 of termcap.src: How-To-Repeat: % screen % ssh localhost % less somefile The end key does not work in less and vim. Screen sets the correct termcap entry in TERMCAP environment variable. But when you connect to some machine with ssh, TERMCAP is not preserved and the old entry in /usr/share/misc/termcap is used instead.
Responsible Changed From-To: freebsd-bugs->ache Over to our de-facto termcap maintainer. The patch in the PR looks good to me, and it does indeed fix the *very* annoying problem with the End key in vi-lookalikes.
State Changed From-To: open->patched Committed into -current
State Changed From-To: patched->closed Committed to RELENG_4 with latest catch-up to CURRENT. Thanks!