Subject: bug in pine 4.30 [Found on line -87 on screen]

From: David Dyck <[email-masked]>
Date: Tue, 19 Dec 2000 10:39:50 -0800 (PST)

When viewing a 366 line message (376 linues including header)
I searched for a word that appeared only onece in the
file (on line 92)

The first time I searched the target word was positioned
on the second line of the text portion of the display
(actually the fourth like of the display),
and an appropriate status message was displayed:
[Found on line 2 on screen]

I searched again, but this time I got the status message

[Found on line -87 on screen]

If I scroll that word 'up' off the screen by pressing
the down arrow twice, I get annother appropriate message
[Search wrapped to start. Found on line 2 on screen]

Seems that anytime I search for a word, when it is already
on the display already (having been searched before) the
status message is incorrect.  If I view the message, and
page down until the search word is displayed, and then
search, the screen line number is displayed correctly.

The problem occurs when searching again
in pine/mailview.c

search_text returns -3
then found_on gets set to 91
but on line 6864
  whereis_pos.row = whereis_pos.row - cur_top_line + 1;
gets assigned -87
whereis_pos.row = 2
and cur_top_line = 90

 (noticed that on line 6832 in case -3
whereis_pos.row = whereis_pos.row - cur_top_line + 1;
 was already computed.

This seems to be an oversight that is a bit confusing.

David

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------