#24 a bug about search backward..

v0.9.0.3
closed-fixed
5
2005-03-30
2005-03-11
venusatman
No

in AbstractSearchDialog.getNextMatchPos(...)
code:
if (lookForWholeWord) tempChange = goForward ?
searchFor.length() + 1 : -searchFor.length() + 1;

I think it should be:
if (lookForWholeWord) tempChange = goForward ?
searchFor.length() + 1 : -(searchFor.length() + 1);

or in some case it will be going into a dead loop...

right?

Discussion

  • venusatman
    venusatman
    2005-03-11

    • assigned_to: nobody --> robert_futrell
     
  • Robert Futrell
    Robert Futrell
    2005-03-30

    • status: open --> closed-fixed
     
  • Robert Futrell
    Robert Futrell
    2005-03-30

    Logged In: YES
    user_id=911646

    Good find! To make RText hang while searching, type the
    following into an editor (minus the quotes):

    "dddd d ddd d d dddd d ddd"

    Then, with the caret still at the end of the line, bring up
    the Find dialog, and search for the text "d" with "whole
    word" and "search backward" selected. RText will freeze
    because tempChange == -1+1 == 0.

    This is fixed in the upcoming 0.9.1.0.