[net.sources.bugs] less

eric@hp-pcd.UUCP (eric) (02/27/86)

This is the only place I can think of to post bug-related info about stuff from
mod.sources...

I compiled the last posting of less(1), and found that (on HP terminals at
least) when you scroll backwards and then quit or jump to a different
location in the file your screen gets messed up because the contents of the
screen BELOW the cursor weren't cleared.

The fix is trivial... in screen.c, make the following change:

223c223
< 	sc_eol_clear = (dumb) ? NULL : tgetstr("ce", &sp);
---
> 	sc_eol_clear = (dumb) ? NULL : tgetstr("cd", &sp);

This simply does a "Clear to end of screen" instead of "clear to end of line"
whenever the cursor is moved to the lower left corner of your screen.
This fixes the problem on HP terminals; I don't know about other terminal
types.

					Eric Gullerud
					Hewlett-Packard, NID
					1020 NE. Circle Blvd.
					Corvallis OR  97330
					(503) 757-2000 ext 3255
					hp-pcd!eric

chris@umcp-cs.UUCP (Chris Torek) (03/02/86)

In article <28800001@hpcvc0.UUCP> eric@hp-pcd.UUCP (Eric Gullerud) writes:

>I compiled the last posting of less(1), and found that (on HP terminals at
>least) when you scroll backwards and then quit or jump to a different
>location in the file your screen gets messed up because the contents of the
>screen BELOW the cursor weren't cleared.
>
>The fix is trivial... in screen.c, make the following change:
>
>223c223
>< 	sc_eol_clear = (dumb) ? NULL : tgetstr("ce", &sp);
>---
>> 	sc_eol_clear = (dumb) ? NULL : tgetstr("cd", &sp);

I am not sure what less uses `sc_eol_clear' for; but if the intention
is to clear to end of line, use `ce'; if it is to clear to the end
of the screen, use `cd'---but fake it if it is not available.
There is a termcap flag that indicates whether reverse scrolling
leaves text below the visible screen bottom.  It is `db'.  There
is a corresponding flag named `da', display retained above, that
indicates whether reverse scrolling may redisplay old scrolled
text.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu