Hi again, If a page with more than one displayable page, where the last displayable page contain exactly one single line, is loaded with lynx, lynx will incorrectly display "(pX of Y)" next to the title (top-right), where Y is one less than total displayable pages. e.g., if there are 3 pages, lynx will show "(p1 of 2)".
Furthermore, lynx will not allow the user to page down to the last page. Here is an example html page you can test the behavior with assuming a 80x24 terminal. You will see "line #19" displayed at the very last line of the first page (above the status lines) and so you expect to see "line #20" on the following page. However, you are not able to page down at this point. /--- lynx_pgr.html ------------------------------------------------------------\ <html><head><title>testing lynx page down</title></head><body> line # 1<br/> line # 2<br/> line # 3<br/> line # 4<br/> line # 5<br/> line # 6<br/> line # 7<br/> line # 8<br/> line # 9<br/> line #10<br/> line #11<br/> line #12<br/> line #13<br/> line #14<br/> line #15<br/> line #16<br/> line #17<br/> line #18<br/> line #19<br/> line #20<br/> </body></html> \------------------------------------------------------------------------------/ Patch below fixes the issue with our in-tree lynx. Top-right shows "(p1 of 2)" correctly and allows one to page down to see last line of the page: "line #20". Same changes exist in the newer lynx source. Comments/OK? --patrick Index: GridText.c =================================================================== RCS file: /cvs/obsd/src/gnu/usr.bin/lynx/src/GridText.c,v retrieving revision 1.7 diff -u -p GridText.c --- GridText.c 31 May 2009 09:16:52 -0000 1.7 +++ GridText.c 15 Dec 2010 10:03:41 -0000 @@ -1709,14 +1709,14 @@ static void display_title(HText *text) sprintf(percent, " (l%d of %d)", text->top_of_screen, text->Lines); } else if ((text->Lines >= display_lines) && (display_lines > 0)) { - int total_pages = ((text->Lines + display_lines - 1) + int total_pages = ((text->Lines + display_lines) / display_lines); int start_of_last_page = ((text->Lines <= display_lines) ? 0 : (text->Lines - display_lines)); sprintf(percent, " (p%d of %d)", - ((text->top_of_screen >= start_of_last_page) + ((text->top_of_screen > start_of_last_page) ? total_pages : ((text->top_of_screen + display_lines) / (display_lines))), total_pages); @@ -7290,7 +7290,7 @@ BOOL HText_canScrollDown(void) HText *text = HTMainText; return (BOOL) ((text != 0) - && ((text->top_of_screen + display_lines) < text->Lines)); + && ((text->top_of_screen + display_lines) <= text->Lines)); } /* Scroll actions On Fri, Dec 10, 2010 at 01:30:37AM -0800, patrick keshishian wrote: > Hello, > > I was wondering if there are any plans for updating base > lynx to the latest version (2.8.7 July 5, 2009)? > > Seems like they have quite a few changes since our last > import. > > Reason I ask is, I found a glitch and have a tiny patch > for it, but I wonder if it is worth waiting for the later > version before submitting it? > > I'll try to verify if the problem I see occurs with the > latest version in the mean time. > > Cheers, > --patrick