Date: Thu, 19 Jul 2007 19:50:43 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Rui Paulo <rpaulo@fnop.net> Cc: current@freebsd.org Subject: Re: less -r broken with long lines Message-ID: <20070719095043.GT1141@turion.vk2pj.dyndns.org> In-Reply-To: <469E737B.5090609@fnop.net> References: <469D651C.6080504@fnop.net> <40882.1184765616@snapdragon.csl.sri.com> <469E737B.5090609@fnop.net>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On 2007-Jul-18 21:09:31 +0100, Rui Paulo <rpaulo@fnop.net> wrote: >It depends on the interpretation. "various display problems may result" >may very well be a reference to the fact that control characters mangle >the output. I wasn't expecting long lines to mangle the output. If you >less -r a file without control characters, but with a least a line wider >than your screen size, you'll notice the problem. I think the behaviour of "less" is reasonable. To correctly work out how many lines of input will fill the screen, "less" needs to identify if/where the terminal will split a string of characters into distinct physical lines. In the face of arbitrary control sequences, it is impossible for "less" to determine this since it cannot know how a particular string will be processed. (It can't rely on termcap/info strings because they are unlikely to document all terminal features). -- Peter Jeremy [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGnzPz/opHv/APuIcRAknyAJ92Rq9GqmSYc14tACfjZAR2Z8TfVACfUthN MJqEqtHBuBq5Q1GQBxq8CTQ= =3qWS -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070719095043.GT1141>
