Author Topic: Threadsearch get the wrong position if a file is not saved  (Read 3825 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Threadsearch get the wrong position if a file is not saved
« on: July 29, 2009, 03:27:25 pm »
see the image below:


My question is: Can ThreadSearch use the unsaved buffer?

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Threadsearch get the wrong position if a file is not saved
« Reply #1 on: July 29, 2009, 03:47:22 pm »
Hi Ollydbg.

ThreadSeach plugin is designed like C::B Search in files implementation (and most other IDE/Editors in fact), i.e. it searches in file content and does not care about open editors.
I designed it this way because it is faster, simpler and I don't want to keep synchronized editors and search results. As soon as you type a char in an editor, ThreadSearch results might be wrong, so, searching in files or editors don't make a big difference.

And I have to admit I already had problems that make me do a Ctrl+S every three typed chars ;)

Dje


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Threadsearch get the wrong position if a file is not saved
« Reply #2 on: July 29, 2009, 04:16:18 pm »
Thanks for the explanation.  :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Threadsearch get the wrong position if a file is not saved
« Reply #3 on: July 29, 2009, 04:27:45 pm »
Thread search could show the AnnoyingDialog, to warn you and make you choose to save all files :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Threadsearch get the wrong position if a file is not saved
« Reply #4 on: July 29, 2009, 05:20:08 pm »
IIRC, Build saves all silently...
I'll try to have a look.

Dje