If I run vi in an envioronment where the TTY doesn't know the screen size (such as a serial console, or qemu's /dev/console with -nographic) it uses the ANSI terminal size querying escape sequence to figure out how big the screen is. The xterm (or similar) at the other end replies with an escape sequence, and all is well. But less always gives me a height of 25 lines, it doesn't even try to query when the TTY doesn't know the size, even though we've got code for it elsewhere.
Fixed in git, will be in 1.19.x: commit 4e552a70ec00e4eb9bb0bcde95688ddb3c4fcefe Author: Denys Vlasenko <vda.linux@googlemail.com> Date: Mon Jul 25 15:18:20 2011 +0200 less: optionally query terminal size via "ESC [ 6 n". Closes bug 2659. +7 bytes is not selected, +100 if selected.