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

"Find uses Selected Text" broken

(1/5) > >>

Pecan:
Somewhere between SVN 3970 and 3975 (nightlies) "Find Uses Selected Text" was broken.

You can nolonger mark text, hit F3 or "find next" using the marked text.

Pecan:

--- Quote from: Pecan on May 28, 2007, 04:32:43 pm ---Somewhere between SVN 3970 and 3975 (nightlies) "Find Uses Selected Text" was broken.

You can nolonger mark text, hit F3 or "find next" using the marked text.


--- End quote ---

Reverting fix 3975 solves this problem.

--- Code: ---Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp (revision 3987)
+++ src/sdk/editormanager.cpp (working copy)
@@ -1295,7 +1295,7 @@
     m_LastFindReplaceData->hiddenSearch = dlg->GetHidden();
     m_LastFindReplaceData->initialreplacing = false;
     m_LastFindReplaceData->NewSearch = true;
-    m_LastFindReplaceData->findUsesSelectedText = hasSelection;
+    //-m_LastFindReplaceData->findUsesSelectedText = hasSelection;
     if(control)
     {   // if editor : store the selection start/end
         // only use this in case of !findInFiles and scope==1 (search in selection)

--- End code ---

Biplab:
Hmm.. my fix broke another part. But it's not broken completely. The bug you've pointed out an be recreated if No search has been made in the editor. Once a search is made, using Ctrl+F, this bug won't show up. :)

Pecan:
I respectfully disagree.

Mark some text. Ctrl-F to make a first find.
Make sure "Find use selected text" box is checked.

Do the find.

Now mark some other text not equal to the first find.
Hit F3.
It finds the first marked text, not the second marked text.

It should have found the second marked text.


One way around this maybe? Check to see if "Find use selected text" box is checked before issuing the 3975 fix.

Biplab:
Agreed. I'd revert the change. Thanks for posting it. :)

Navigation

[0] Message Index

[#] Next page

Go to full version