Bug in "less" (unofficial fix)
viktor at math.princeton.edu
viktor at math.princeton.edu
Fri Mar 9 04:21:18 AEST 1990
Less incorrectly detects EOF when a file of greater than screen
height lines follows a short (<=sc_height lines) file.
The problem is related to the varaible squished not being cleared
with the conclusion that the next file is also short.
One fix is to reset squished in prepaint() instead of squish_check(),
since prepaint() is called by squis_check(), the latter remains
essentially the same, while we squash the squish bug since prepaint
is called early in the processing of each file.
===================================================================
RCS file: RCS/prim.c,v
retrieving revision 1.1
diff -c -r1.1 prim.c
*** /tmp/,RCSt1a05224 Thu Mar 8 12:58:36 1990
--- prim.c Thu Mar 8 12:52:54 1990
***************
*** 100,106 ****
{
if (!squished)
return;
- squished = 0;
repaint();
}
--- 100,105 ----
***************
*** 356,361 ****
--- 355,361 ----
POSITION pos;
{
hit_eof = 0;
+ squished = 0;
forw(sc_height-1, pos, 1, 0);
screen_trashed = 0;
}
Viktor Dukhovni <viktor at math.princeton.edu> : ARPA
<...!uunet!princeton!math!viktor> : UUCP
Fine Hall, Washington Rd., Princeton, NJ 08544 : US-Post
+1-(609)-258-5792 : VOICE
More information about the Comp.sources.bugs
mailing list