Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Find Previous (Shift-F3) disappeared[Resolved]

(1/1)

Pecan:
Somewhere between SVN 3139 and SVN 3218 Find Previous quit working.
There is no response to Shift-F3 or clicking on the menu item.

This is the only entry that looks like it might apply:

3164     /     killerbot     2 weeks     
* searching bugfix : when intially there was a
selection but then the scope was changed to
'Global' the selection coordinates should have no
influence any more, it's back to a normal search
without selection

Pecan:
I reversed SVN 3164 by commenting out the changes (below).
editormanager.cpp line:1335

It restored "Find Previous". So something is amiss with the modification.



--- Code: ---        int ssta = control->GetSelectionStart();
        int send = control->GetSelectionEnd();
        int cpos = control->GetCurrentPos();
        int clen = control->GetLength();

//        // when the user initially had a selection, but then changed the scope
//        // to entire scope, the values of ssta and send will have a bad influence in
//        // the following calculations, therefor check for the scenario
//        // and set the ssta en send to cpos (in the case there would be no selection
//        // that's the value they have [no selection : ssta=send=cpos])
//        if(data->scope== 0 && (ssta != cpos || send != cpos))
//        {
//        ssta = cpos;
//        send = cpos;
//        }



        data->start = 0;
        data->end   = clen;


--- End code ---

killerbot:

--- Quote from: Pecan on November 16, 2006, 01:17:13 am ---I reversed SVN 3164 by commenting out the changes (below).
editormanager.cpp line:1335

It restored "Find Previous". So something is amiss with the modification.



--- Code: ---        int ssta = control->GetSelectionStart();
        int send = control->GetSelectionEnd();
        int cpos = control->GetCurrentPos();
        int clen = control->GetLength();

//        // when the user initially had a selection, but then changed the scope
//        // to entire scope, the values of ssta and send will have a bad influence in
//        // the following calculations, therefor check for the scenario
//        // and set the ssta en send to cpos (in the case there would be no selection
//        // that's the value they have [no selection : ssta=send=cpos])
//        if(data->scope== 0 && (ssta != cpos || send != cpos))
//        {
//        ssta = cpos;
//        send = cpos;
//        }



        data->start = 0;
        data->end   = clen;


--- End code ---

--- End quote ---

will have a look at it and fix it.
[probably find previous has some variable not properly (re)set triggering the if, since it surely does not happen with 'find next' F3]

killerbot:
fixed

Pecan:

--- Quote from: killerbot on November 16, 2006, 10:04:48 am ---fixed

--- End quote ---

Thanks Lieven.
Works fine.

Navigation

[0] Message Index

Go to full version