[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV Bug in "whereis" handling?

From: Jonathan Sergent
Subject: LYNX-DEV Bug in "whereis" handling?
Date: Tue, 04 Mar 1997 01:58:57 -0500

Ok, here's the scenario:  two items of text, matching a certain search
key from "whereis" (/).  You search for the first one, then press n 
to tr y to get to the second one, __which isn't on the screen, it's 
either just past the last line on the screen or one after that__.  
Lynx doesn't go there -- it doesn't see that item at all.

Look at this file for a very very crude demonstration:

Scroll down with ^N until the first "look for me" line is at the 
very top of the screen with nothing above it.  Then search for "look."  
This line will get highlighted.  Now press 'n' which should find the 
next "look" line.  It doesn't; it just sits there.  Also, if you 
scroll down to see the second line, and press 'n' it will get stuck 
at the first occurrence as well.

I'm not sure if it's always this way or if this got added at some
point (CHANGES shows a fix for an unidentified glitch in WHEREIS 
handling in 1996 -- I'm too lazy to try to look in the archives 
for this at this hour, but I'm sure someone else will either remember
it or look for it if there is someting in there).

This patch seems to fix the problem.  I don't know if it breaks other 
things (it might, since I spent about 10 minutes tracking this down and
doing it and I know next to nothing about the code).  I'd guess that 
it applies equally well to 2.7+bugfixes and 2.7+WB+CT.  

This is mainly an educated guess on my part.  A few lines down, we're
adding this offset to the current line to calculate the place we start
searching, and if (for example) we are on line 1 of a 23 line window,
adding 24 to the current position gets us to line 25 which leaves line 
24 out in the cold.

Maybe it shouldn't be -1, maybe the two should just be equal.  Don't
ask me.  

If this is a bona fide bug (I think it is) it ought to get fixed in
the bugfixes file as well as in the development code (seeing as how 
it's so simple).  If it's not, then kindly ignore me.


diff -c src/LYSearch.c.orig src/LYSearch.c
*** src/LYSearch.c.orig Tue Mar  4 01:22:01 1997
--- src/LYSearch.c      Tue Mar  4 01:22:03 1997
*** 251,257 ****
       * link we are on, or the next page.
      if (nlinks == 0)
!       offset = display_lines+1;
        offset = links[cur_doc->link].ly;

--- 251,257 ----
       * link we are on, or the next page.
      if (nlinks == 0)
!       offset = display_lines-1;
        offset = links[cur_doc->link].ly;

; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]