I'm hitting a weird case where I can't add a new member to a struct in my macro. This repros for me in 17 and 18 beta 4.
The following reduced macro code will load, but if I add an int to the top of the SymColour struct (ie int m_foo;), then I'll suddenly get an Invalid argument during _InitSymColour and Find Slick-C error says that m_rgb is now wrong. Any ideas as to what's going wrong?
#include "slick.sh"
#import "main.e"
#include "markers.sh"
struct SymColour
{
int m_ColourSymHighlight;
int m_cRef; // used for delayed color creation and selection.
int m_rgb;
} s_symColour[];
static void _InitSymColour()
{
s_symColour[0].m_ColourSymHighlight = -1;
s_symColour[0].m_rgb = _rgb(0xff, 0xff, 0x00);
s_symColour[0].m_cRef = 0;
}
static void DeferredInitSymHighlight()
{
if ( !pos( "-mdihide", _editor_cmdline, 1, 'i' ) )
{
_InitSymColour()
}
}
definit()
{
_post_call( DeferredInitSymHighlight );
}