Author Topic: Find Previous (Shift-F3) disappeared[Resolved]  (Read 5022 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2873
Find Previous (Shift-F3) disappeared[Resolved]
« on: November 16, 2006, 12:12:24 am »
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
« Last Edit: November 16, 2006, 03:14:29 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2873
Re: Find Previous (Shift-F3) disappeared
« Reply #1 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;

« Last Edit: November 16, 2006, 01:30:29 am by Pecan »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Find Previous (Shift-F3) disappeared
« Reply #2 on: November 16, 2006, 07:30:43 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;


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]
« Last Edit: November 16, 2006, 07:33:42 am by killerbot »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Find Previous (Shift-F3) disappeared
« Reply #3 on: November 16, 2006, 10:04:48 am »
fixed

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2873
Re: Find Previous (Shift-F3) disappeared[Resolved]
« Reply #4 on: November 16, 2006, 03:15:37 pm »