I was using _MarkerTypeAlloc( ) to allocate the types for each register type. Is that the wrong way to do it?
s_qwMarkerType = _MarkerTypeAlloc( );
s_dwMarkerType = _MarkerTypeAlloc( );
s_sMarkerType = _MarkerTypeAlloc( );
s_rMarkerType = _MarkerTypeAlloc( );
s_qwRegColor = _AllocColor( );
s_dwRegColor = _AllocColor( );
s_sRegColor = _AllocColor( );
s_rRegColor = _AllocColor( );
_default_color( s_qwRegColor, 0xffffff, 0x0000ff, F_BOLD );
_default_color( s_dwRegColor, 0xffffff, 0xff0000, F_BOLD );
_default_color( s_sRegColor, 0xffffff, 0x00ff00, F_BOLD );
_default_color( s_rRegColor, 0xffffff, 0xff00ff, F_BOLD );
and then
markerIndices[ numMarkerIndices ] =
_StreamMarkerAdd( p_window_id, offset, match_length(), true, bmpIndex, markerType, null );
_StreamMarkerSetTextColor( markerIndices[ numMarkerIndices ], color );
finally, doing the actual search with this copied function
// had to copy this from some builtin macro because my search depends on it
static _str get_quick_search_word(int &start_col)
{
word := "";
if( select_active2() )
{
if( !_begin_select_compare()&&!_end_select_compare() )
{
/* get text out of selection */
last_col := 0;
buf_id := 0;
_get_selinfo(start_col,last_col,buf_id);
if( _select_type('','I') ) ++last_col;
if( _select_type()=='LINE' )
{
_str line;
get_line(line);
word=line;
start_col=0;
}
else
{
word=_expand_tabsc(start_col,last_col-start_col);
}
_deselect();
}
else
{
deselect();
word=cur_word(start_col,'',1);
}
}
else
{
word=cur_word(start_col,'',1);
}
return word;
}