Author Topic: Error in macro  (Read 774 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1882
  • Hero Points: 182
  • Text
Error in macro
« on: August 24, 2016, 10:53:25 pm »
So I've got a macro that I've used for years, and suddenly today I gives me a stack - but only when I run it on 1 particular file.
I don't see anything unusual about the file - just a utf-8 C++ file, less than 2kb - pretty pedestrian.

When I record a new macro using the built in slick function that does the same thing (copy the buffer name to the clipboard), the run last_recorded_macro, it too gets the same error!

What the heck is up?

What is the second argument of _macro('R', 1) for?
How can it be that this error depends on which file I'm editing?
Especially since I've never seen this before the there doesn't seem to be anything unusual about this file?


Oh.... playing with it more .. the trick is that the cursor is on a line in the CPP file like
#if ....

If I put the cursor in any other CPP file on a #if line, then I get this same error.

Really weird!



 #include "slick.sh"
_command last_recorded_macro() name_info(','VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL) {
_macro('R',1); // error here.
execute('copy_buf_name');
}

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5012
  • Hero Points: 417
Re: Error in macro
« Reply #1 on: August 25, 2016, 02:57:45 am »
Reproduced. Bizarre!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5012
  • Hero Points: 417
Re: Error in macro
« Reply #2 on: August 25, 2016, 03:21:40 am »
Fixed for beta 4