Author Topic: Highlight macro misbehavior: maybe problem with stream marking?  (Read 1336 times)

mako

  • Community Member
  • Posts: 27
  • Hero Points: 1
I started using the hightlight_text macros (from this thread: http://community.slickedit.com/index.php/topic,7335.0.html) back in SE17. It allows one to cause several different text strings or text matching regular expressions to be highlighted wherever they appear. I modified it slightly, my version is attached.

Now that I've upgraded to SE18 beta, the highlight still appears when one of the highlight_* macros is invoked, but sometimes it disappears as soon as the cursor is moved. The funny thing is, it only disappears for some of the 7 different allocated marker types. I'm wondering if there is something wrong with the way that _MarkerTypeAlloc() is used, or maybe the way that it is working, such that SE18 is inadvertently clearing the marker flags or other marker state when the cursor is moved.

BTW, I have also tried SymHighlight (from this thread: http://community.slickedit.com/index.php/topic,4701.0.html). It does not seem to suffer from the same problem in SE18, but it only uses a single marker type, and it seems to have some deferred initialization mechanism which may avoid the problem.

I'm a Slick C novice, so I don't yet understand the fine points of marker usage or all that is going on in these macros. As it is, SymHighlight doesn't support highlighting a selected string that is only part of a complete word, or prompting for a regex, but I can probably adapt it to do that. I'm mostly raising this as an issue in case it indicates an underlying bug in stream marking.