Author Topic: MFFIND_LIST_CURRENT_CONTEXT not working with mffind2  (Read 419 times)

rowbearto

  • Senior Community Member
  • Posts: 1343
  • Hero Points: 100
MFFIND_LIST_CURRENT_CONTEXT not working with mffind2
« on: September 23, 2017, 03:00:25 pm »
I'm using MFFIND_LIST_CURRENT_CONTEXT in a call to mffind2() in my macros. It is not listing the current context in the search results, but I believe that it should?

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1241
  • Hero Points: 124
Re: MFFIND_LIST_CURRENT_CONTEXT not working with mffind2
« Reply #1 on: September 25, 2017, 01:08:19 pm »
I recorded a macro with List current context enabled and did a Find in Files, then replayed the macro and got the expected results.  The recorded macro listed a call to _mffind2 and the results included the current function context for the match.  There are limitations to list current context where it won't list any.  The language must have context tagging, and it currently only supports functions and methods.  There is no context listed for items found in global namespace or inside class or struct that aren't contained within a method.  I hope to address items inside class/struct context at a later date.

rowbearto

  • Senior Community Member
  • Posts: 1343
  • Hero Points: 100
Re: MFFIND_LIST_CURRENT_CONTEXT not working with mffind2
« Reply #2 on: September 25, 2017, 01:22:19 pm »
My bad, it is working. Turns out my macro was calling mark_all_occurrences and not mffind2, and I forgot to set this flag in the wrapper function for mark_all_occurrences. Sorry for the noise.