Author Topic: Find in "Current Procedure" does not wrap (C language)  (Read 7374 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #15 on: September 12, 2016, 03:48:44 PM »
If I remove the "undef" of those #defines, then I get the same issue with you for the Ctrl+[

But if you create the undefs in the preprocessor, you will be able to successfully do Ctrl+[

Again, make these undef in the preprocessor:

HOST
LTE_FRAME_TYPE_2
METRO_2x2

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #16 on: September 12, 2016, 04:05:01 PM »
I'm doing Ctrl+[ on the function with the defines in it. Not preprocessor output. That's part of the limitation. It doesn't matter what preprocessing you've configured in SlickEdit.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #17 on: September 12, 2016, 05:19:46 PM »
Did you remember to check the box for "undef"?

Attached is a screenshot of my preprocessor settings.

With these preprocessor settings, Ctrl+[ works properly. Without these preprocessor settings (and checking "undef"), then I have the issue that you have.


rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #18 on: September 12, 2016, 05:21:49 PM »
I'm not doing this on preprocessor output either. What I meant is did you configure the preprocessor settings (my screenshot), to "undef" these 3 values?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #19 on: September 12, 2016, 05:49:18 PM »
I goofed. It's not Ctrl+[. It's Ctrl+] (find-matching-paren).

select-proc doesn't use your SlickEdit preprocessing settings to find the end brace of the function. Ctrl+] doesn't use your preprocessing settings either.


rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #20 on: September 12, 2016, 05:53:15 PM »
I've been using Ctrl+] the whole time, and it works well for me.

You claim that Ctrl+] doesn't look at preprocessor settings, but I am observing different behavior.

When I make the 3 defines as undef in the preprocessor settings, Ctrl+] (not [) IS working properly.

And when I don't make these 3 defines as undef in the preprocessor settings, I get the same behavior as you.

Did you try Ctrl+] (not [) with the preprocessor settings? Because when I try it, it works for me.

So I think Ctrl+] is using preprocessor settings, but select-proc is not?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #21 on: September 12, 2016, 06:06:11 PM »
Interesting. There is a little bit of smarts in find_matching_paren that is effected by your preprocessing settings. However, the function "c_select_proc_common" doesn't have any of that logic which does some syntax color matching.

In any case, this isn't the best way for select_proc to be implemented. The end location is actually stored in our tagging context information so there shouldn't be a need for us to use raw text searching to find the end brace of the function.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #22 on: September 12, 2016, 08:40:36 PM »
OK. Well it could be nice if you could fix the issues with searching in "Current Procedure" on this function, as it led me to changing some wrong code and wasting some time.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #23 on: September 12, 2016, 09:57:07 PM »
Worse case, we will have a hot fix for this very soon.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #24 on: September 13, 2016, 03:19:43 AM »
Thanks!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #25 on: September 13, 2016, 02:30:39 PM »
This will be fixed in RC 2

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Find in "Current Procedure" does not wrap (C language)
« Reply #26 on: September 13, 2016, 03:05:42 PM »
Excellent! Thanks!