SlickEdit Product Discussion > SlickEdit®



There seems to be a new problem here - I don't remember seeing this in 25.0.2
In my SymHighlights code it allocates a color:

--- Code: ---            m_ColorSymHighlight = _AllocColor((int)fg, g_ColorDefinitions[m_ColorDefIndex].m_rgb, F_INHERIT_FG_COLOR);
            say("_AllocColor index=" m_ColorSymHighlight ", m_ColorDefIndex="m_ColorDefIndex);

--- End code ---

Then when highlighting a word:

--- Code: ---                            int pos_marker = _StreamMarkerAdd( p_window_id, offset_highlight, length_Highlight, isRealOffset, 0, s_markertypeSymHighlight, '');
                            _StreamMarkerSetTextColor(pos_marker, colorIndex);
                            say("_StreamMarkerSetTextColor index=" colorIndex ", pos_marker="pos_marker);
--- End code ---

The problem is that sometimes, the color doesn't update.
Everytime symtag_toggle_sym_highlight is called it changes the color being used. (It calls _FreeColor(), and _AllocColor() when doing this).

From the say() output, I can see that a different color from my color table is selected, but the actual color on screen doesn't change.

The index returned by _AllocColor() stays the same.

Highlighting a second word and cycling it works.

Then trying to cycle the color on the 1st word starts working.


[0] Message Index

Go to full version