Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site cadre.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!cmu-cs-pt!cadre!km From: km@cadre.ARPA (Ken Mitchum) Newsgroups: net.micro.pc,net.micro,net.sources Subject: Re: faster paging in JOVE Message-ID: <514@cadre.ARPA> Date: Wed, 18-Sep-85 11:26:02 EDT Article-I.D.: cadre.514 Posted: Wed Sep 18 11:26:02 1985 Date-Received: Fri, 20-Sep-85 06:01:25 EDT References: <513@cadre.ARPA> Reply-To: km@cadre.ARPA (Ken Mitchum) Distribution: net Organization: Decision Systems Lab., University of Pittsburgh Lines: 44 Xref: watmath net.micro.pc:5336 net.micro:12027 net.sources:3484 > > 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@cadre.arpa) Brought to you by Super Global Mega Corp .com