tool:fgrep & code folding

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
raz
Posts: 16
Joined: Wed Jan 19, 2005 3:41 pm
Location: MidWest -- USA

tool:fgrep & code folding

Post by raz » Thu Mar 17, 2005 4:51 pm

I'm not sure if this is a bug or by design, but...
when I have code folded (hidden) and perform a tool / fgrep (find in files),
it does not find text that has been folded. This is not what I expect.
Details: C source code, example below
for example:

unfolded:

if (foobar)
{
<blah ...>
target text is here: HIT!
}


folded:
if (foobar)
{ .... }

If i use the tool/fgrep to search for "HIT" it will not 'find' it in 'folded' mode.

comments? thoughts? is this a bug, or by design?

-raz.

Guest

Post by Guest » Thu Mar 17, 2005 10:34 pm

Hi Raz,

This is definitely a bug :)

As a test I used this bit of code:

Code: Select all

int main()
{
  if (1)
  {
    // find that
  }

  if (1)
  {
    // find this
  }

  return test;
}
and folded up the two if nodes. Then when I run xfgrep -f -n this bug.cpp on the file the search result are as follows:

Code: Select all

fgrep -f -n this bug.cpp
D:\temp\bug.cpp (10)     // find_this
But as you point out, when the enter key is used on this line of output the cursor ends up on line 14 (as shown in the status bar) and not on the line 10 displayed in the results window :(

I don't know if Zeus should open the fold in this case (my first impression would be to say that it should not), but it should definitely put the cursor on the folded line to indicate the text is located inside the fold.

I will add this to the bug list.

Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 2 guests