faster paging in JOVE
Ken Mitchum
km at cadre.ARPA
Thu Sep 19 01:26:02 AEST 1985
>
> B) Replace the functions NextPage() and PrevPage() in draw.c with
>these versions:
>
>PrevPage()
>{
> LINE *newline;
>
> if (exp_p)
> DownScroll();
> else {
> newline = prev_line(curwind->w_top, curwind->w_height/3);
> curwind->w_line = newline;
> DotTo(newline, 0);
>#ifndef UNIX
> CanScroll = 0;
>#endif
> }
>}
While the above works, the following guarantees that a succession of
prev-page next-page commands will return to the same line:
PrevPage()
{
LINE *newline;
int p = (curwind->w_height & 1) ? 1 : 2;
if (exp_p)
DownScroll();
else {
newline = prev_line(curwind->w_top, curwind->w_height/3 +p);
curwind->w_line = newline;
DotTo(newline, 0);
#ifndef UNIX
CanScroll = 0;
#endif
}
}
Sorry, but I did not discover the error until after the posting.
-Ken Mitchum
(km at cadre.arpa)
More information about the Comp.sources.unix
mailing list