SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => SlickEdit User Macros => Topic started by: ronw on February 03, 2014, 11:30:21 PM
-
From the message line, I can run:
box
and the current selection will be wrapped in a comment block.
Looking at box.e, it seems I should be able to run:
box '#ifndef DEBUG' '' '#endif' '' '' '' '' ''
and the selection will be wrapped with "#ifdef DEBUG" and "#endif".
But, I get the error "There are no comment block settings for '#ifdef'"
What am I doing wrong?
-
I figured it out. I wrote a macro to call box with the "decorations" I want.
#include "slick.sh"
_command cond()
{
parse arg(1) with symbol;
box("#ifdef " :+ symbol, "", "#endif // " :+ symbol, "", "", "", "");
}
-
I made an enhanced, second macro:
_command conde()
{
parse arg(1) with symbol;
box("#ifdef " :+ symbol, "", "#else\n#endif // " :+ symbol, "", "", "", "");
}
Which gave the following result:
#ifdef FEATURE
And a paragraph of text for
testing purposes.
#else)#endif // FEATURE
There is a ")" where I expected the line break.
Looking through box.e, the only possible thing I found to explain this is:
s.blc=_UTF8ToMultiByte(s.blc);
Have I found a bug?