Bug 2659

Summary: less doesn't query terminal size through serial connection.
Product: Busybox Reporter: Rob Landley <rob>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.17.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Rob Landley 2010-10-04 23:51:46 UTC
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.
Comment 1 Denys Vlasenko 2011-07-25 13:20:05 UTC
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.