Bug 2659 - less doesn't query terminal size through serial connection.
Summary: less doesn't query terminal size through serial connection.
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.17.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 23:51 UTC by Rob Landley
Modified: 2011-07-25 13:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.